Home >> FAQs/Tutorials >> Oracle Tutorials

Oracle Tutorials - Show Dropped Tables in Recycle Bin

By: FYIcenter.com

(Continued from previous topic...)

How To View the Dropped Tables in Your Recycle Bin?

You can look what's in your recycle bin through the predefined view called RECYCLEBIN. You can use the SELECT statement to list the dropped tables as shown in the following script:

SQL> connect HR/fyicenter
Connected.

SQL> CREATE TABLE emp_dept_90 
  2  AS SELECT * FROM employees WHERE department_id=90;
Table created.

SQL> SELECT COUNT(*) FROM emp_dept_90;
  COUNT(*)
----------
         3

SQL> DROP TABLE emp_dept_90;
Table dropped.

SQL> COL original_name FORMAT A14
SQL> SELECT object_name, original_name, droptime
  2  FROM recyclebin;
OBJECT_NAME                    ORIGINAL_NAME DROPTIME
------------------------------ ------------- ---------------
BIN$uaSS/heeQuys53HgXRhEEQ==$0 EMP_DEPT_10   06-04-01:18:57:
BIN$gSt95r7ATKGUPuALIHy4dw==$0 EMP_DEPT_10   06-04-01:19:59:
BIN$bLukbcgSQ6mK1P2QVRf+fQ==$0 EMP_DEPT_90   06-04-01:20:47:

As you can use the EMP_DEPT_10 was dropped twice. If the same table was dropped multiple times, you need to restore by using the object name in the recycle bin with FLASHBACK statement.

Note that RECYCLEBIN is just an alias of USER_RECYCLEBIN.

(Continued on next topic...)

  1. What Is a Database Table?
  2. How Many Types of Tables Supported by Oracle?
  3. How To Create a New Table in Your Schema?
  4. How To Create a New Table by Selecting Rows from Another Table?
  5. How To Rename an Existing Table?
  6. How To Drop an Existing Table?
  7. How To Add a New Column to an Existing Table?
  8. How To Add a New Column to an Existing Table with a Default Value?
  9. How To Rename a Column in an Existing Table?
  10. How To Delete a Column in an Existing Table?
  11. How To View All Columns in an Existing Table?
  12. How To Recover a Dropped Table?
  13. What Is Recycle Bin?
  14. How To Turn On or Off Recycle Bin for the Instance?
  15. How To View the Dropped Tables in Your Recycle Bin?
  16. How To Empty Your Recycle Bin?
  17. How To Turn On or Off Recycle Bin for the Session?
  18. How To List All Tables in Your Schema?

Oracle Tutorials:

More...


Other Tutorials/FAQs:

More...


Related Resources:

More...


Selected Jobs:

More...