SQL DatabaseLesson 47Free preview
SQL Drop DB
This lesson is part of SQL · All levels
Summary
DROP DATABASE permanently deletes the entire database along with all its tables and data. Since the effects are damaging and irreversible, this command must be carried out with great care. To simply remove one table, use a DROP TABLE that has a limited impact.
Key points
- DROP DATABASE permanently deletes all content from the database.
- Can't be de-undo; make sure the backup is available.
- Add IF NOT EXIST to avoid errors when the database is not found.
- DROP TABLE only deletes one table, not the entire database.
- Unlike DELETE, which only deletes the data line.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.