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
How do I tune a mysql query?
What is difference between group by and order by clause?
Is there a free mysql?
What is the purpose of mysql database?
What is the purpose of using timestamp data type?
How do I insert multiple rows in a table?
What are stored procedures and functions?
How do you determine the location of mysql data directory?
What is join in mysql? What are the different types of join?
What is difference between inner vs self vs cross?
What is the difference between primary key and candidate key?
What is procedures in mysql?
Is there a way to see the files which are stored?
How do I backup mysql database on linux?
What causes mysql too many connections?