drop table

Drop a table from a database

Syntax

drop_table:
        DROP TABLE [database_name.]table_name

Description

The DROP TABLE statement deletes the table definition from the database definition and (effectively) destroys all existing table rows and associated indexes.

If specified, the database_name, must match that associated with the most recently issued ALTER SCHEMA statement. If no ALTER SCHEMA statement has been issued then an implicit ALTER SCHEMA is assumed.

If the table being dropped is referenced from other tables, the DROP TABLE will fail—those referencing tables must first be altered to drop the REFERENCES constraints to this table.

See Also

CREATE TABLE