SQL> SELECT * FROM tab;
DEPT
EMP
BONUS
SALGRADE
SQL> DROP TABLE emp;
Table dropped.
SQL> SELECT * FROM tab;
TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
BIN$rPTa2P2JR0iX9PYUu38Wsw==$0 TABLE
DEPT TABLE
BONUS TABLE
SALGRADE TABLE
SQL> SHOW RECYCLEBIN
ORIGINAL NAME RECYCLEBIN NAME OBJECT TYPE DROP TIME
---------------- ------------------------------ ------------ -------------------
EMP BIN$rPTa2P2JR0iX9PYUu38Wsw==$0 TABLE 2015-04-10:23:54:38
SQL> FLASHBACK TABLE EMP TO BEFORE DROP;
Flashback complete.
SQL> SELECT * FROM TAB;
TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
EMP TABLE
DEPT TABLE
BONUS TABLE
SALGRADE TABLE
The table is restored successfully. In this concept the table doesn't go permanently from the database. It stays there in recyclebin. It still takes space. If we want to get back that space and remove the table permanently from recyclebin do the following:
SQL> PURGE RECYCLEBIN;
If you don't want to send the table to recyclebin and delete it permanently then use the below command:
SQL> DROP TABLE EMP PURGE;
DEPT
EMP
BONUS
SALGRADE
SQL> DROP TABLE emp;
Table dropped.
SQL> SELECT * FROM tab;
TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
BIN$rPTa2P2JR0iX9PYUu38Wsw==$0 TABLE
DEPT TABLE
BONUS TABLE
SALGRADE TABLE
SQL> SHOW RECYCLEBIN
ORIGINAL NAME RECYCLEBIN NAME OBJECT TYPE DROP TIME
---------------- ------------------------------ ------------ -------------------
EMP BIN$rPTa2P2JR0iX9PYUu38Wsw==$0 TABLE 2015-04-10:23:54:38
SQL> FLASHBACK TABLE EMP TO BEFORE DROP;
Flashback complete.
SQL> SELECT * FROM TAB;
TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
EMP TABLE
DEPT TABLE
BONUS TABLE
SALGRADE TABLE
The table is restored successfully. In this concept the table doesn't go permanently from the database. It stays there in recyclebin. It still takes space. If we want to get back that space and remove the table permanently from recyclebin do the following:
SQL> PURGE RECYCLEBIN;
If you don't want to send the table to recyclebin and delete it permanently then use the below command:
SQL> DROP TABLE EMP PURGE;
Thanks..
ReplyDeleteSir could you please send other realtime scenarios in vickey3162@gmail.com mail id..
Thanks,
Devdatta
thanks dear sir
ReplyDeletecall me at 9059431200
Delete