This topic describes how to delete a table and provides the syntax for the DROP TABLE statement.
Syntax
DROP TABLE [ IF EXISTS ] table_name [, ...];
The DROP TABLE statement supports deleting multiple tables at a time.
The following table describes the parameters.
|
Parameter |
Description |
|
IF EXISTS |
|
|
table_name |
The name of the table to delete. |
Example
The following example shows how to delete a table.
DROP TABLE holo_test;
Delete a table using the HoloWeb console
You can use HoloWeb to delete a table without writing SQL commands. Follow these steps:
In the top navigation bar of the HoloWeb console, click Metadata Management.
-
In the Logged On Instances list on the left side of the Metadata Management page, right-click the table that you want to delete and select Delete Table.

-
In the Delete Table dialog box, click OK to delete the table.
FAQ
-
Symptom
The following error is reported:
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.. -
Cause
The table cannot be deleted because a view depends on it.
-
Solution
Run the following statement to force delete the table. This statement also deletes any views that depend on the table.
DROP TABLE [ IF EXISTS ] <table_name> [, ...] CASCADE;