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

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)

猜你喜欢

转载自blog.51cto.com/215363/2533716