YMatrix
Quick Start
Connecting
Benchmarks
Deployment
Data Usage
Manage Clusters
Upgrade
Global Maintenance
Expansion
Monitoring
Security
Best Practice
Technical Principles
Data Type
Storage Engine
Execution Engine
Streaming Engine(Domino)
MARS3 Index
Extension
Advanced Features
Advanced Query
Federal Query
Grafana
Backup and Restore
Disaster Recovery
Guide
Performance Tuning
Troubleshooting
Tools
Configuration Parameters
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.