SQL NULL 的问题
1.select null where null not in (1,2) 没有结果
--------------A查询---------------------------------
select
gbi.goodsitemGuid
from
VGoodsBill gb
left join
VGoodsBillItem gbi on gb.Guid=gbi.goodsbillGuid
where gbi.goodsitemGuid not in
(select Guid from VGoodsItem group by guid)
--------------A查询---------------------------------
select
gbi.goodsitemGuid
from
VGoodsBill gb
left join
VGoodsBillItem gbi on gb.Guid=gbi.goodsbillGuid
这里面有的结果为Null,
select Guid from VGoodsItem group by guid 这个结果没有NuLL,
但是A查询的结果为: