Deletes one or more tables from the database.
Syntax
DROP TABLE [ IF EXISTS ] table_name [, ...];DROP TABLE supports deleting multiple tables in a single statement by passing a comma-separated list of table names.
Parameters
| Parameter | Description |
|---|---|
IF EXISTS | Suppresses the error if the table does not exist. Without this option, dropping a nonexistent table returns ERROR: table "non_exist_table" does not exist. |
table_name | The name of the table to delete. |
Usage notes
Before dropping a table, check whether any views depend on it. Dropping a table that a view references causes the DROP TABLE statement to fail with the following error:
ERROR: cannot drop table xxx because other objects depend on it.
Detail: view xxx depends on table xxx.
Hint: Use DROP ... CASCADE to drop the dependent objects too.If dependent views exist, use CASCADE to drop the table and all its dependent views together, or drop the views first before dropping the table.
Examples
Drop a single table:
DROP TABLE holo_test;Drop multiple tables at once:
DROP TABLE table1, table2, table3;Drop a table without raising an error if it does not exist:
DROP TABLE IF EXISTS holo_test;Drop a table and all dependent views:
DROP TABLE IF EXISTS holo_test CASCADE;Delete a table using the HoloWeb console
To delete a table without writing SQL, use the HoloWeb console:
Go to the HoloWeb page. For more information, see Connect to HoloWeb and run a query.
In the top menu bar of the HoloWeb page, click Metadata Management.
In the Logged On Instances list on the left side of the Metadata Management page, right-click the table and select Delete Table.

In the Delete Table dialog box, click OK.
What's next
CREATE TABLE — Create a new table in Hologres.
ALTER TABLE — Modify an existing table's structure.