日期:2014-05-16  浏览次数:20457 次

删除重复的列

delete from RATE_COUNTY_MESS a

?where (a.orgid) in (select tt.orgid

? ? ? ? ? ? ? ? ? ? ? ?from RATE_COUNTY_MESS tt

? ? ? ? ? ? ? ? ? ? ? group by tt.orgid

? ? ? ? ? ? ? ? ? ? ?having count(*) > 1)

? ?and rowid not in (select min(rowid)

? ? ? ? ? ? ? ? ? ? ? ?from RATE_COUNTY_MESS tt

? ? ? ? ? ? ? ? ? ? ? group by tt.orgid

? ? ? ? ? ? ? ? ? ? ?having count(*) > 1)