Oracle-多表查询
内连接 select * from 表名 (别名) (inner) join 表名 (别名) on 连接条件 连接emp表和dep表(emp表中与dep表中的did是关联字段,这样查询did会出现2次): select * from emp,dep where emp.did = dep.did 相当于 select * from emp inner join dep on emp.did=dep.did 相当于 select * from emp join dep on emp.did=dep.did 如果只想出现一次关联字段,需要像下书写: select emp.*,dep.name,dep.daddress from emp join dep on emp.did=dep.did 给表指定别名 select * from 表名 别名 inner join 表名 别名 on 连接条件 -- 需要显示的指明匹配条件,查询结果两个关联列因为名称可能不同,所以全部显示 select * from dept d join emp e on d.deptno = e.deptno 注意:内连...