基本信息
文件名称:SQL99连接查询:CROSS JOIN与NATURAL JOIN详解.pdf
文件大小:113.6 KB
总页数:2 页
更新时间:2026-01-29
总字数:约小于1千字
文档摘要
1.crossjoin(交叉连接)
交叉连接会产生一个笛卡尔积
select*fromempcrossjoindept;
在笛卡尔积中,有很多数据是无意义的,所以需要消除,
可以通过where子句来消除
select*fromempcrossjoindeptwhere
emp.deptno=dept.deptno;
可以在查询时,给表格起别名
selecte.*,me,locfromempecrossjoindeptd
whe