Back to Trino

DROP TABLE

docs/src/main/sphinx/sql/drop-table.md

480512 B
Original Source

DROP TABLE

Synopsis

text
DROP TABLE  [ IF EXISTS ] table_name

Description

Drops an existing table.

The optional IF EXISTS clause causes the error to be suppressed if the table does not exist. The error is not suppressed if a Trino view with the same name exists.

Examples

Drop the table orders_by_date:

DROP TABLE orders_by_date

Drop the table orders_by_date if it exists:

DROP TABLE IF EXISTS orders_by_date

See also

{doc}alter-table, {doc}create-table