查询某个字段不在查询结果中的记录

参考新浪文章http://blog.csdn.net/liuxilil/article/details/6718409

--测试不可

select * from [dbo].[Storage_WeiWai] where WeiWaiId  not in (select RowGuid from  [dbo].[Storage_InAndOutMain])

--测试可以
select * from [dbo].[Storage_WeiWai] a where not exists (select 1 from  [dbo].[Storage_InAndOutMain] b where a.WeiWaiId=b.RowGuid )
原文地址:https://www.cnblogs.com/sulong/p/4813714.html