SQL1999表连接

--1992年sql标准,连接条件和过滤条件写在一起。
select ename,dname,grade
from emp e,dept d,salgrade s
where e.deptno = d.deptno and e.sal between s.losal and s.hisal and job<>'CLERK';

--1999年sql标准,连接条件和过滤条件分开
select ename,dname,grade
from emp e join dept d on (e.deptno = d.deptno)
join salgrade s on (e.sal between s.losal and s.hisal)
where ename not like '_A%';

你可能感兴趣的:(SQL1999表连接)