DROP TABLE
Applies to: ❌ Data 360 SQL ✅ Tableau Hyper API
Remove a table.
DROP TABLE removes one or more tables from the database. To empty
a table of rows without destroying the table, use DELETE
or TRUNCATE.
IF EXISTSDo not throw an error if the table does not exist.
<name>The name (optionally schema-qualified) of the table to drop.
CASCADEAutomatically drop objects that depend on the table (such as views), and in turn all objects that depend on those objects.
RESTRICTRefuse to drop the table if any objects depend on it. This is the default.
To destroy two tables, films and distributors:
This command conforms to the SQL standard, except that the standard only
allows one table to be dropped per command, and apart from the
IF EXISTS option, which is a Hyper extension (also available in
PostgreSQL).