DROP
Valid in: SQL, ESQL, OpenAPI, ODBC, JDBC, .NET
The DROP statement destroys one or more tables, indexes, or views.
The DROP statement has the following format:
[EXEC SQL] DROP objecttype objectname [WITH with_clause]
objecttype
Specifies the type of object, which can be one of the following keywords:
TABLE
VIEW
INDEX
objectname
Specifies the name of a table, view, or index.
WITH with_clause
Specifies a comma‑separated list of valid Enterprise Access product WITH clause options. For an overview of the Enterprise Access product WITH clause, see the chapter "OpenSQL Features.” For a list of the valid WITH clause options for a specific Enterprise Access product, see the product guide.
The DROP statement removes the specified tables, indexes, and views from the database. When a table is dropped, any indexes, views, or privileges defined on that table are automatically dropped also. When a view is dropped, all associated privileges and dependent views are dropped.
To ensure application portability, follow every DROP statement with a COMMIT statement.
Last modified date: 08/28/2024