Skip to main content
Skip table of contents

DROP TABLE

Removes an Indexima table.

Syntax

syntax

BASH
DROP TABLE [IF EXISTS] [db_name.]table [CASCADE]

<table>

The full name of the table you want to delete.


IF EXISTS clause

The optional IF EXISTS clause makes the statement succeed regardless of whether the table exists or not.

  • If the table does exist, it is dropped.
  • if it does not exist, the statement has no effect.

This capability is useful in standardized setup scripts that remove existing schema objects and create new ones. By using some combination of IF EXISTS for DROP statements and IF NOT EXISTS clauses for CREATE statements, the script can run successfully both in your first execution when schema objects do not yet exist, and for future executions when some or all schema objects already exist.

CASCADE

Will delete views related to the table.

Output

This SQL command does not return anything.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.