QUEL Reference Guide > QUEL Reference Guide > QUEL and EQUEL Statements > DESTROY--Destroy Tables, Views, Permissions, Integrities
Was this helpful?
DESTROY--Destroy Tables, Views, Permissions, Integrities
Valid in: QUEL, EQUEL
Destroys existing tables, views, permissions, or integrities.
This statement has the following format:
[##] destroy tablename {tablename}
[##] destroy permit | integrity tablename integer {, integer} | all
Destroy removes tables from the database, or integrity constraints and permissions from a table or view. Only the owner is allowed to destroy a table or its permissions and integrity constraints. Destroying a table destroys all views built on that table.
If the table being destroyed has secondary indexes, the secondary indexes are also destroyed. You can destroy a secondary index separately, without affecting the base table.
To destroy individual permissions or constraints for a table, you must use the integer argument. Use the help permit statement (for permissions) or a help integrity statement (for constraints) to display the argument values for the various individual permissions and constraints. To destroy all constraints or permissions, specify all.
Destroy accepts a maximum of 30 arguments. To destroy more than 30 objects, you must use multiple destroy statements.
Last modified date: 11/28/2023