YMatrix
Quick Start
Standard Cluster Deployment
Data Modeling
Connecting to The database
Data Migration
Data Query
Maintenance and Monitoring
Performance Tuning
Troubleshooting
Reference Guide
SQL Reference
FAQ
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.