验证中...
语言: SQL
分类: 数据库相关
最后更新于 2019-02-13 01:36
两种方法
原始数据 复制代码
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;

评论列表( 0 )

你可以在登录后,发表评论

搜索帮助