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

Try DataDirect Drivers Now

Drop Table

Purpose

The Drop Table statement drops (removes) a local table, its data, and its indexes.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.

Notes

*Remote tables cannot be dropped.