Sunday, March 30, 2008

7-24. Dropping a table

Dropping a table removes:
  • Data
  • Table structure
  • Database triggers
  • Corresponding indexes
  • Associated object privileges

Optional clauses for the DROP TABLE statement:

  • CASCADE CONSTRAINTS: Dependent referential integrity constraints are removed as well.
  • PURGE: No flashback possible

Some considerations:

If you do not use the PURGE option, the table definition, associated indexes, and triggers are placed in a recycle bin. That means that the space taken up by the table and its indexes still counts against user's allowed quota for the tablespaces involved. Use PURGE RECYCLEBIN command to empty the recycle bin or FLASHBACK TABLE command to recover schema objects if PURGE clause was not used in DROP TABLE statement

No comments: