oracle中多表连接如何用?
以两表为例:
有以下两张表:
现在要通过deptno字段,在查询中显示emp表中全部内容和dept表中的dname字段。
可用如下语句:
select a.*,b.dname from emp a,dept b where a.deptno=b.deptno;
查询结果: