文章列表
Oracle相关 - Aking.he 1.删除重复项, 只保留第一条 delete table t1 where t1.ID not in ( select min(t2.ID) from table t2 group by t2.ColName) 2.查找重复记录 select t1.ID, count(*) from table group by t1.ID having count(*) > 1 order by count(*) desc 3.导入数据时, 如果目标表存在主键且主键在源表中没有对应的字段时, 使用触发器+序列 cre ...