会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
The blog of Madream
坐在松树顶上,看到天上六只直升机排成一行 唑洅湾仔頂樓,窗邊菂佬鹰飝翔嗻
博客园
::
首页
::
新随笔
:: :: ::
管理
2009年3月17日
not exists相当于not in .并且not exists比not in 效率高
摘要: 比如表A主键id与表B的外键a_id关联,要在A表中查出id不等于B表中所有a_id的记录:not in 写法: select * from A where id not in (select a_id from B where a_id = A.id )not exists写法: select * from A where id not exists (select 1 from B where...
阅读全文
posted @ 2009-03-17 15:24 Madream.F
阅读(217)
评论(0)
推荐(0)
编辑