skip to main content
Querying data stores with SQL : Supported SQL and Extensions : Drop Table for Salesforce
  

Try Now

Drop Table for Salesforce

Purpose

The Drop Table statement drops (removes) a table, its data, and its indexes.

Syntax

DROP TABLE table_name [IF EXISTS] [RESTRICT | CASCADE]
where:
table_name
Specifies the name of an existing table to drop.
IF EXISTS
Specifies that an error is not to be returned if the table does not exist.
RESTRICT
Is in effect by default, meaning that the drop fails if any tables or views reference this table.
CASCADE
Specifies that the drop extends to linked objects and any tables that reference the specified table are dropped also.