--创建表
CREATE TABLE zsq01 ( id VARCHAR(32) NOT NULL,NAME VARCHAR(20) NOT NULL );
--删除表中重复数据只保留一条
DELETE /*+parallel(t,10)*/FROM &TABLENAME
WHERE (ID) IN (SELECT ID FROM &TABLENAME GROUP BY ID HAVING COUNT(ID) > 1)
AND ROWID NOT IN
(SELECT MIN(ROWID) FROM &TABLENAME GROUP BY ID HAVING COUNT(*) > 1);