标签:
SELECT * from TBCITY_Temp
where code
in (
select
code
from TBCITY_Temp
group by code
having count(code) > 1
)
and AutoId not in (
select min(AutoId)
from TBCITY_Temp
group by code
having count(code)>1)
-- 条件为code再重复数据里,and Id 不是最小的
标签:
原文地址:http://www.cnblogs.com/chengeng/p/4446921.html