What is the difference between the DELETE TABLE and TRUNCATE TABLE commands in MySQL?
Answer Posted / hrindows@gmail.com
DELETE TABLE is a logged operation, and every row deleted is logged. Therefore, the process is usually slow.
TRUNCATE TABLE also deletes rows in a table, but it will not log any of the rows deleted. The process is faster here in comparison. TRUNCATE TABLE can be rolled back and is functionally similar to the DELETE statement without a WHERE clause.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is 'mysqlcheck'?
What is the maximum size of mysql database?
What is the innodb in mysql?
What is triggers and how it can be used in mysql?
What is view in mysql?
How do I delete a row in mysql?
How to return query output in xml format?
What are the advantages of a procedure?
Which is faster mysql or mongodb?
How can I insert images into a Mysql database?
What are the differences between innodb and myisam engines?
Can mysql and mariadb coexist?
How do I run mysql?
What is offset limit?
What is query log in mysql?