Home >> FAQs/Tutorials >> Oracle Tutorials

Oracle Tutorials - Empty Your Recycle Bin

By: FYIcenter.com

(Continued from previous topic...)

How To Empty Your Recycle Bin?

If your recycle bin is full, or you just want to clean your recycle bin to get rid of all the dropped tables, you can empty it by using the PURGE statement in two formats:

  • PURGE RECYCLEBIN - Removes all dropped tables from your recycle bin.
  • PURGE TABLE table_name - Removes the specified table from your recycle bin.

Here is an example script on how to use the PURGE statement:

SQL> connect HR/fyicenter
Connected.

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

SQL> DROP TABLE emp_dept_10;
Table dropped.

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

SQL> DROP TABLE emp_dept_90;
Table dropped.

SQL> SELECT COUNT(*) FROM recyclebin;
  COUNT(*)
----------
         5

SQL> PURGE TABLE emp_dept_90;
Table purged.

SQL> SELECT COUNT(*) FROM recyclebin;
  COUNT(*)
----------
         4

SQL> PURGE RECYCLEBIN;
Recyclebin purged.

SQL> SELECT COUNT(*) FROM recyclebin;
  COUNT(*)
----------
         0

(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...