读书人

not exists不能单单理解为差集

发布时间: 2012-08-01 17:53:40 作者: rapoo

not exists不能仅仅理解为差集

要看以谁为主表,

见如下示例,同样的表,主表不一样,结果不一样:

?

?

select * from [left]  lwhere not exists (select * from [right] rwhere l.name=r.name)-------------------------------下面这个例子充分说明,not exists不能单单理解为差集select * from [right]  rwhere not exists (select * from [left] lwhere l.name=r.name)
?

?

?

?

?

?

?

读书人网 >其他数据库

热点推荐