Previous Topic: DELETE FROM Statement

Next Topic: FETCH Statement

DROP TABLE Statement

The DROP TABLE statement removes the SQL dictionary definition for a relational table, making it impossible to access the data using SQL. However, the VSAM data set containing the data is not affected by the DROP TABLE statement.

By issuing a CREATE TABLE command for the relational table, the data is once again accessible using SQL.

Syntax

LSQL DROP TABLE tablename

tablename

The name of the table to be removed.

Note: You can use a host variable for tablename.

Example

To remove the APPLICATIONS table, issue this LSQL command:

LSQL DROP TABLE APPLICATIONS