Previous Topic: DELETE FROM StatementNext 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 DROP TABLE statement does not affect the VSAM data set containing the data.

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

Syntax

LSQL DROP TABLE tablename

Parameters

tablename

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