日期:2014-05-17 浏览次数:20554 次
select * from tb t where exists (select 1 from tb where 往来单位=t.往来单位 and 物料=t.物料 and 单价<>t.单价)
------解决方案--------------------
select * from tb t where exists (select 1 from tb where 往来单位=t.往来单位 and 物料=t.物料 having count(1)>1)
------解决方案--------------------
select * from tb t where exists (select 1 from tb where 往来单位=t.往来单位 and 物料=t.物料 group by 往来单位,物料 having count(1)>1)