Drop Table
- Last Updated: May 15, 2020
- 1 minute read
- DataDirect Connectors
- JDBC
- IBM Db2 5.1
- MySQL 5.1
- Progress OpenEdge 5.1
- SAP Sybase 5.1
- Documentation
Purpose
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 also are dropped.