Quick onboard
Deployment
Data Modeling
Connection
Migration
Query
Operations and Maintenance
Common Maintenance
Partition
Backup and Restore
Expansion
Monitoring
Performance Tuning
Troubleshooting
Reference Guide
Tool guide
Data Type
Storage Engine
Executor
Stream
DR (Disaster Recovery)
Configuration
Index
Extension
SQL Reference
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.