All Products
Search
Document Center

Hologres:DROP TABLE

Last Updated:Feb 04, 2026

This topic describes how to delete a table and provides the syntax for the DROP TABLE statement.

Syntax

DROP TABLE [ IF EXISTS ] table_name [, ...];
Note

The DROP TABLE statement supports deleting multiple tables at a time.

The following table describes the parameters.

Parameter

Description

IF EXISTS

  • If you specify IF EXISTS, the statement succeeds even if the table does not exist.

  • If you do not specify IF EXISTS and the table does not exist, an error is returned: ERROR: table "non_exist_table" does not exist.

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:

  1. Go to HoloWeb.

  2. In the top navigation bar of the HoloWeb console, click Metadata Management.

  3. 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.删除表

  4. 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;