create unique index test on table_name(DAY,TIME_SEGMENT,USER,USER_TYPE)
tablespace vlc_01
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 2M
next 2M
minextents 1
maxextents unlimited
pctincrease 0
);提示 ORA-01452 cannot CREATE UNIQUE INDEX;duplicate keys found该如何解决呢?
tablespace vlc_01
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 2M
next 2M
minextents 1
maxextents unlimited
pctincrease 0
);提示 ORA-01452 cannot CREATE UNIQUE INDEX;duplicate keys found该如何解决呢?
然后删除该表 TRUNCATE TABLE 表名;
最后将创建的临时表改回原来的名字即可: ALTER TABLE TEMP_TAB RENAME TO 表名;通过以上几步可以删掉表中的重复记录,可能还会有更简便的方式