Database Management MySQL Subjective
Oct 01, 2025

Explain the difference between DELETE, DROP, and TRUNCATE commands.

Detailed Explanation

DELETE: Removes specific rows based on WHERE condition, can be rolled back
DROP: Removes entire table structure and data permanently
TRUNCATE: Removes all rows but keeps table structure, faster than DELETE, cannot be rolled back

Example:
DELETE FROM users WHERE age < 18;
TRUNCATE TABLE temp_data;
DROP TABLE old_table;

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback