删除重复的列

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)

你可能感兴趣的:(删除)