<span style="font-size:18px;">--查询没有雇员的部门信息</span>
<strong> ---用连接查询1
select distinct A.* from dept A,emp B
where
B.deptno not in A.deptno</strong>
<strong>select deptno,dname,loc from dept where dname=
(select dname from(
select * from emp a full join dept b on a.deptno = b.deptno
minus
select * from emp a left join dept b on a.deptno = b.deptno ))</strong><strong>select * from emp a full join dept b on a.deptno = b.deptno
minus
select * from emp a left join dept b on a.deptno = b.deptno </strong>

被折叠的 条评论
为什么被折叠?



