Synopsis
Description
TheDROP TABLE
command is used to remove a table from the current database, including all its rows, its metadata and related indexes.
Parameters
table_name
The name of the table to be dropped.
RESTRICT
Return an error if any column in the table to be dropped is referenced by another table’s column (foreign key).
Note: This is the default behavior even without specifying RESTRICT
. The option is supported for for compatibility with PostgreSQL.
Examples
Drop a table:customers
.
Compatibility
The
DROP TABLE
command conforms to the SQL standard.