- 将原标进行rename操作:RENAME loganalysis to loganalysis_bak;
- 压缩备份表:alter table LOGANALYSIS_bak move compress;
- 查看备份表的索引字段:SELECT * from user_cons_columns where TABLE_NAME=‘LOGANALYSIS_BAK‘;
- 清除备份表的索引:alter table LOGANALYSIS_BAK drop constraint SYS_C005697;
- 查看备份表建表语句:select dbms_metadata.get_ddl(‘TABLE‘,‘LOGANALYSIS_BAK‘) from dual;
- 创建新表
- 创建新表索引:alter table LOGANALYSIS add constraint PK_LOGANALYSIS primary key(id);
时间: 2024-10-10 18:23:48