奇怪的 in 子查询 问题 :
select goodsno from md_userinfo where username='test'
返回结果集:
'Z0076','Z0323-1','P0217-3'
而
select vt_clientNo,vt_clientname,vt_goodsNo,vt_goodsname,
vt_iostyle, vt_buyquantity,vt_salequantity from w_salebuy where vt_goodsNo in (select goodsno from md_userinfo where username='test')
和
select vt_clientNo,vt_clientname,vt_goodsNo,vt_goodsname,
vt_iostyle, vt_buyquantity,vt_salequantity from w_salebuy where vt_goodsNo in ('Z0076','Z0323-1','P0217-3')
的结果却不一样!!
前者返回的记录中没有符合'P0217-3' 的记录,不知为何??