标签:保留 mss sql product having field ati sel version
select field1,field2 from table
group by field1,field2 having COUNT(*)>1
delete table
where field1 in (select field1 from VersionProductRelation a
group by field1,field2 having COUNT(*)>1)
and field2 in (select field2 from VersionProductRelation a
group by field1,field2 having COUNT(*)>1)
and ID not in (
select MIN(ID) from table
group by field1,field2 having COUNT(*)>1)
标签:保留 mss sql product having field ati sel version
原文地址:https://www.cnblogs.com/Alex-Mercer/p/12263095.html