标签:on 数据 sql br 测试 rom select it c
select count(1), gsdm, id
from ods_sc.T_D_DEVICE_COMMON
group by gsdm, id
having count(1) > 1;
delete from ods_sc.T_D_DEVICE_COMMON
where rowid in
(select a.rowid
from ods_sc.T_D_DEVICE_COMMON a, ods_sc.T_D_DEVICE_COMMON b
where a.gsdm = b.gsdm
and a.id = b.id
and a.rowid < b.rowid);
commit;
可以在测试环境试试这个语句。
标签:on 数据 sql br 测试 rom select it c
原文地址:http://www.cnblogs.com/galeno/p/4150177.html