srkp.net
当前位置:首页 >> Exissql is null 索引 >>

Exissql is null 索引

EXISTS 是判断是否存在,和in类似,但效率要比in高 SELECT * FROM EMP (基础表) WHERE EMPNO > 0 AND EXISTS (SELECT ‘X' FROM DEPT WHERE DEPT.DEPTNO = EMP.DEPTNO AND LOC = ‘MELB') SELECT * FROM EMP (基础表) WHERE EMPNO > 0 AND DEPTNO IN...

SELECT * FROM msg_log a WHERE not exists (SELECT * FROM msg_log b WHERE b.relarecid IS NOT NULL AND b.operation ='E' and a.recid = b.relarecid) and a.relarecid IS NULL AND a.operation ='E'

网站首页 | 网站地图
All rights reserved Powered by www.srkp.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com