Syntax
Parameters
Examples
This statement removes thetaxi_trips table in the default schema (public) from the database:
taxi_trips table in the rw_schema schema from the database:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Use the DROP TABLE command to remove a table from the database.
DROP TABLE [ IF EXISTS ] [schema_name.]table_name [ CASCADE ];
| Parameter | Description |
|---|---|
| schema | Specify the name of a schema to remove the table in that schema. You can use SHOW SCHEMAS to get a list of all available schemas. If you don’t specify a schema, the specified source in the default schema public will be removed. |
| table | The name of the table to remove. You can use SHOW TABLES to get a list of all available tables. |
| CASCADE option | If this option is specified, all objects (such as materialized views) that depend on the table, and in turn all objects that depend on those objects will be dropped. |
taxi_trips table in the default schema (public) from the database:
DROP TABLE taxi_trips;
taxi_trips table in the rw_schema schema from the database:
DROP TABLE IF EXISTS rw_schema.taxi_trips;
Was this page helpful?