注册 登录
编程论坛 SQL Server论坛

not exists

thjaxd 发布于 2007-02-03 20:00, 945 次点击
where not exists 这样的语句是用来实现什么的?该怎么用?哪位解释一下,谢谢啊
2 回复
#2
bygg2007-02-03 23:38
https://bbs.bc-cn.net/viewthread.php?tid=118534

还有其它的帖子也说到这个问题,建议楼主自己多找找。
#3
thjaxd2007-02-04 14:57
我的权限只能查询标题是not exists 的,我查联机丛书得到结论是:
select aa.* from aa where not exists (select bb.id from bb where aa.id=bb.id)
能准确求出aa里面有而bb里面没有的纪录对么?
这个回复算是总结吧,
不过我不确定对不对啊,老是感觉心里不踏实啊!
还有,谢谢!

[此贴子已经被作者于2007-2-4 15:00:40编辑过]

1