– 查询出每个员工的姓名、所属部门名称、月薪等级及其领导的姓名、所属部门名称。
select e.ename,d.dname,s.grade,ep.ename,dd.dname from emp e,dept d,salgrade s,emp ep,dept dd where e.deptno=d.deptno and where s.sal between s.losal and where e.mgr=ep.empno and where ep.deptno=dd.deptno; sele
select e.ename,d.dname,s.grade,ep.ename,dd.dname from emp e,dept d,salgrade s,emp ep,dept dd where e.deptno=d.deptno and where s.sal between s.losal and where e.mgr=ep.empno and where ep.deptno=dd.deptno; sele