A table can be dropped with a DROP TABLE statement.
About this task
When a table is dropped, the row in the SYSCAT.TABLES
system catalog view that contains information about that table is
dropped, and any other objects that depend on the table are affected.
For example:
- All column names are dropped.
- Indexes created on any columns of the table are dropped.
- All views based on the table are marked inoperative.
- All privileges on the dropped table and dependent views are implicitly
revoked.
- All referential constraints in which the table is a parent or
dependent are dropped.
- All packages and cached dynamic SQL and XQuery statements dependent
on the dropped table are marked invalid, and remain so until the dependent
objects are re-created. This includes packages dependent on any supertable
above the subtable in the hierarchy that is being dropped.
- Any reference columns for which the dropped table is defined as
the scope of the reference become "unscoped".
- An alias definition on the table is not affected, because an alias
can be undefined
- All triggers dependent on the dropped table are marked inoperative.
Restrictions
An
individual table cannot be dropped if it has a subtable.