DROP

The DROP statement deletes a table or index.

Invocation

This statement can be used in an application program using the DB2 CLI functions or issued through the CLP.

Syntax

>>-DROP--+-TABLE--table-name-+---------------------------------><
         '-INDEX--index-name-'
 
 

Description

TABLE table-name
Identifies the base table that is to be dropped. table-name must identify a table that is described in the catalog (SQLSTATE 42704).
INDEX index-name
Identifies the index that is to be dropped. The index-name must identify an index that is described in the catalog (SQLSTATE 42704). It cannot be an index required by the system for a primary key (SQLSTATE 42704).

Rules

None.

Notes

Example

Drop table EMPLOYEE.

     DROP TABLE EMPLOYEE

Related reference