ORACLE 删除重复行,保留一条记录SQL
DELETE FROM cux_temp t WHERE t.name_id IN ( SELECT c.name_id FROM cux_temp c GROUP BY c.name_id HAVING COUNT(c.name_id) > 1) AND ROWID NOT IN ( SELECT min(c.rowid) row_id FROM cux_temp c GROUP BY c.name_id HAVING COUNT(c.name_id) > 1);