DROP TABLE statement

The DROP TABLE statement removes the specified table.

A table is created by a CREATE TABLE statement.

Syntax

DROP TABLE tableName

Statement dependency system

Triggers, constraints (primary, unique, check and references from the table being dropped), and indexes defined on the table are silently dropped. The existence of an open cursor that references a table being dropped causes the DROP TABLE statement to generate an error, and the table is not dropped.

The DROP TABLE statement will also generate an error if the table is used in a view, or if a trigger defined on another table references the table in its trigger action.

Dropping a table invalidates statements that depend on the table. (Invalidating a statement causes it to be recompiled upon the next execution. See Interaction with the dependency system.)

Related reference
DROP DERBY AGGREGATE statement
DROP FUNCTION statement
DROP INDEX statement
DROP PROCEDURE statement
DROP ROLE statement
DROP SCHEMA statement
DROP SEQUENCE statement
DROP SYNONYM statement
DROP TRIGGER statement
DROP TYPE statement
DROP VIEW statement