YMatrix
Cluster Deployment
Data Model
Data Writing
Data Query
SQL Reference
Maintenance and Monitoring
Tool Guide
Troubleshooting
Delete the table.
DROP TABLE [IF EXISTS] name [, ...] [CASCADE | RESTRICT]
DROP TABLE Deletes tables from the database. Only table owners, schema owners and superusers can delete tables. To clear the row table without deleting the table definition, use DELETE or TRUNCATE.
DROP TABLE always deletes all indexes, rules, triggers, and constraints that exist in the target table. However, to delete a table referenced by a view, CASCADE must be specified. CASCADE will completely remove the dependent view.
IF EXISTS
name
CASCADE
RESTRICT
Delete table mytable:
DROP TABLE mytable;
DROP TABLE is fully compliant with the SQL standard, but this standard only allows one table to be deleted per command. Additionally, the IF EXISTS option is a YMatrix database extension.