skip to main content
Supported SQL Statements and Extensions : Drop Table
  

Try DataDirect Drivers Now

Drop Table

Purpose

The Drop Table statement drops (removes) a remote or local table, its data, and its indexes. A remote table is a Salesforce object and is exposed in the SFORCE schema. Dropping a table in the SFORCE schema drops a remote table. A local table is maintained by the driver and is local to the machine on which the driver is running. A local table is exposed in the PUBLIC schema. Dropping a table in the PUBLIC schema drops a local table.

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. If the specified table is a local table, it drops all dependent views and any foreign key constraints that link this table to other tables. If the specified table is a remote table, any tables that reference the specified table are dropped also.