断点

每天进步一点点!
posts - 174, comments - 56, trackbacks - 0, articles - 21

SQL1999表连接

Posted on 2010-07-06 23:18 断点 阅读(181) 评论(0)  编辑  收藏 所属分类: Oracle DBA

--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%';


只有注册用户登录后才能发表评论。


网站导航: