let us we discuss about flashback table in this session what is flashback table? -Flashback table concept is to recover your drop table .it was introduced on oracle 1og -If user drop the table accidentally we can recover the table using flashback command  i.e its recover from recycle bin not depends on undo tablespace or undo_retention -We ensure the recycle bin parameter enabled or not s-1 To check recycle bin  parameter from sysdba user

SQL> show parameter recyclebin

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
recyclebin                           string      on

s-2 logon  scott user view what are the tables available in that

SQL> select * from tab;

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
BONUS                          TABLE
DEPT                           TABLE
EMP                            TABLE
RAM                            TABLE
SALGRADE                       TABLE
SYS_TEMP_FBT                   TABLE

here we are going to drop ram table so executed drop command

SQL> drop table ram;

Table dropped.

after drop that ram table it is still in recycle bin it seems

SQL> select * from tab;                

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
BIN$LhpfuvEpsVfgUAB/AQAS9g==$0 TABLE
BONUS                          TABLE
DEPT                           TABLE
EMP                            TABLE
SALGRADE                       TABLE
SYS_TEMP_FBT                   TABLE

s-3 going to  flash back drop table

SQL> flashback table ram to before drop;

Flashback complete.

dropped table has been recovered s-4 check our user table

SQL> select * from tab;

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
BONUS                          TABLE
DEPT                           TABLE
EMP                            TABLE
RAM                            TABLE
SALGRADE                       TABLE
SYS_TEMP_FBT                   TABLE

6 rows selected.

Flashback rename table we can rename table name though flashback recover command   s-1 Drop table 'RAM'

SQL>drop table ram;
table dropped

check the tables in scott after drop that ram table it is still in recycle bin it seems

SQL> select * from tab;

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
BONUS                          TABLE
DEPT                           TABLE
EMP                            TABLE
RAM                            TABLE
SALGRADE                       TABLE
SYS_TEMP_FBT                   TABLE

6 rows selected.

s-2 Rename the table name through flashback table

SQL> flashback table ram to before drop rename to emp_1;

Flashback complete.

check the table name from scott

SQL> select * from tab;

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
BONUS                          TABLE
DEPT                           TABLE
EMP                            TABLE
EMP_1                          TABLE
SALGRADE                       TABLE
SYS_TEMP_FBT                   TABLE

6 rows selected.

now table 'RAM' changed into 'EMP_1' Purge objects from recycle bin If you want to recover the space used by a dropped table give the following command

SQL> purge table emp?

If you want to purge objects of logon user give the following command

SQL> purge recycle bin?

If you want to recover space for dropped objects of a particular tablespace give the command

SQL> purge tablespace hr?

You can also purge only objects from a tablespace belonging to a specific user, using the following form of the command:

SQL> PURGE TABLESPACE  HULK USER scott?

If you have the SYSDBA privilege, then you can purge all objects from the recycle bin, regardless of which user owns the objects, using this command:

SQL> PURGE DBA_RECYCLEBIN?

 Permanent  Drop Tables  This commands for reading purpose only if we use this command that table  will be dropped permanently s-1 Drop table using purge

SQL> drop table emp_1 purge;

Table dropped.

s-2 check table in scott user tab

SQL> select * from tab;

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
BONUS                          TABLE
DEPT                           TABLE
EMP                            TABLE
SALGRADE                       TABLE
SYS_TEMP_FBT                   TABLE

Dropped table not available in recycle bin   s-3 try to flashback table

SQL> flashback table emp_1 to before drop;
flashback table emp_1 to before drop
*
ERROR at line 1:
ORA-38305: object not in RECYCLE BIN

these  seems it ll drop the table permanently and it cannot be restored.