DROP statement
The DROP statement deletes an object from the metadata catalog.
Syntax
Parameters
- INDEX index-name
Deletes an index definition from the metadata catalog.
Following the INDEX keyword is the index name. If qualified, the name is a two-part name, and the authorization ID that qualifies the name is the index owner. If an unqualified name is supplied, the owner name is the authorization ID from the CURRENT SQLID special register.
One of the following permissions is required to run the statement:- SYSADM
- DBADM for the database type that is in the DBNAME column for the table that is referenced by the index
- Ownership of index_name or the owner of table that is referenced by the index.
- TABLE table-name
Deletes a table from the metadata catalog. The table name can be a qualified or unqualified table name. If an unqualified name is supplied, the table owner is from the CURRENT SQLID special register.
When a table is deleted, all dependent indexes are deleted, in addition to any views that reference the table. All authorization information that is associated with the table is also deleted from the metadata catalog.
One of the following permissions is required to run the DROP TABLE statement:- SYSADM
- DBADM for the database type that is in the DBNAME column for the table referenced by the index
- Ownership of the table that you are dropping
- PROCEDURE procedure-name
Deletes a stored procedure definition from the metadata catalog. The procedure name can be a qualified or unqualified name. If an unqualified name is supplied, the stored procedure owner is from the CURRENT SQLID special register.
All authorization information that is associated with the procedure is also deleted from the metadata catalog.
One of the following permissions is required to run the DROP PROCEDURE statement:- Ownership of the procedure
- SYSADM authority
- VIEW view-name
Identifies the name of the view to be deleted. view-name can be a qualified or unqualified view name. If an unqualified name is supplied, the view owner is obtained from the CURRENT SQLID special register.
When a view is deleted, all authorization information that is associated with the view is also deleted from the metadata catalog. DROP VIEW deletes dependent views along with those specified in the DROP VIEW statement.
One of the following permissions is required to execute the DROP VIEW statement:- SYSADM
- Ownership of the view being dropped
