DROP-TABLE
Name
DROP TABLE
Description
This statement is used to drop a table.
Syntax:
DROP TABLE [IF EXISTS] [db_name.]table_name [FORCE];
Note:
- After executing DROP TABLE for a certain while, the dropped table can be recovered through the RECOVER statement. See RECOVER statement for details
- If you execute DROP TABLE FORCE, the system will not check whether there are unfinished transactions in the table and the table will be deleted directly and cannot be recovered, so we do not recommend this operation for most cases.
Example
-
Delete a table
DROP TABLE my_table;
-
If it exists, delete the table of the specified database
DROP TABLE IF EXISTS example_db.my_table;
Keywords
DROP, TABLE