Database IntegrationLesson 55Free preview
MySQL Drop Table
This lesson is part of Node.js · All levels
Summary
DROP TABLE permanently deletes a table with all its structure and data, thus differing from DELETE which only deletes rows. This order is destructive and cannot be revoked without backup. Therefore, run only after you have verified the need and have backed up the data.
Key points
- DROP TABLE permanently removes the table and its structure and contents
- DROP TABLE IF NOT EXIST to avoid errors when the table does not exist
- TRUNCATE deleted all the lines but the table structure remains
- Always backup before executing a destructive order in production
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.