日期:2014-05-18 浏览次数:20445 次
select productID from tb where productID in(select productID from tb where remark='未超出' group by productID having count(1)=1)
------解决方案--------------------
也就是说 有remark为“未超出”也有“超出” 的不要是吧
SELECT [productID] FROM tb WHERE remark='未超出' EXCEPT SELECT [productID] FROM tb WHERE remark='超出'