验证中...
Languages: SQL
Categories: 数据库相关
Latest update 2019-02-13 01:36
两种方法
Raw Copy
SELECT e.ename,e.salary,d.dname,g.grade FROM emp e,dept d,salgrade g WHERE e.deptno=d.deptno
AND e.salary>=g.lowSalary AND e.salary<=g.highSalary;
SELECT e.ename,e.salary,d.dname,g.grade FROM emp e,dept d,salgrade g WHERE e.deptno=d.deptno
AND e.salary BETWEEN g.lowSalary AND g.highSalary;
SELECT e.ename,e.salary,d.dname,g.grade FROM emp e
JOIN dept d ON e.deptno=d.deptno
JOIN salgrade g ON e.salary BETWEEN g.lowSalary AND g.highSalary;

Comment list( 0 )

You need to Sign in for post a comment

Help Search