MySQL
DROP TABLE / TRUNCATE TABLE / DROP DATABASE Statement
We can use DROP TABLE / TRUNCATE TABLE / DROP DATABASE to delete a table or database.
Delete table (DROP TABLE)
Delete the entire data table completely.
DROP TABLE table_name;
Only delete the table content, but keep the structure (TRUNCATE TABLE)
TRUNCATE TABLE table_name;
The data sheet is still there, but the data is empty.
DROP DATABASE
DROP DATABASE database_name;
Post a Comment
0 Comments