標籤:style color 使用 io for 資料 div amp sp
文法: drop table ... purge;例子:drop table test purge;purge是直接刪除表,不保留到資源回收筒,10G開始預設drop表式改名移動到資源回收筒;閃回(flashback)語句:1、能在一個語句中把表恢複到指定的時間點;2、恢複表資料連同索引與約束資訊;3、能返回表及其內容到指定時間點或系統變更號(SCN);4、修複表的誤操作閃回簡單樣本:SQL> drop table emp2; Table dropped SQL> select original_name,operation,droptime from recyclebin; ORIGINAL_NAME OPERATION DROPTIME-------------------------------- --------- -------------------EMP2 DROP 2012-11-16:10:49:13 SQL> flashback table emp2 to before drop; Done SQL> select count(*) from emp2; COUNT(*)---------- 107 --恢複誤刪表資料樣本:SQL> select sysdate 時間, timestamp_to_scn(sysdate) SCN from dual; 時間 SCN----------- ----------2012/11/16 1230043 SQL> delete from emp2; 107 rows deleted SQL> commit; Commit complete SQL> select count(*) from emp2; COUNT(*)---------- 0 SQL> flashback table emp2 to scn 1230043; flashback table emp2 to scn 1230043 ORA-08189: cannot flashback the table because row movement is not enabled SQL> alter table emp2 enable row movement; Table altered SQL> flashback table emp2 to scn 1230043; Done SQL> select count(*) from emp2; COUNT(*)---------- 107
oracle中關於刪除表purge語句和閃回語句的基本使用