码迷,mamicode.com
首页 > 其他好文 > 详细

not exists是后面 是正再否的 关系

时间:2020-09-18 02:21:46      阅读:44      评论:0      收藏:0      [点我收藏+]

标签:dia   没有   HERE   rom   not   sts   问题   exists   exist   

select materno from mpcwlzkb a where

not exists (select materno from sh_fin.dianzi_erpfin.dbo.U_mpcwlzkb b )

上面这段语句 返回没有结果。

下面这段语句返回有结果。

因为 上面的语句有问题。

select materno from mpcwlzkb a where

not exists (select materno from sh_fin.dianzi_erpfin.dbo.U_mpcwlzkb b where a.materno=b.materno)

not exists是后面 是正再否的 关系

标签:dia   没有   HERE   rom   not   sts   问题   exists   exist   

原文地址:https://blog.51cto.com/215363/2533716

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!