What is the difference between the DELETE TABLE and TRUNCATE TABLE commands in MySQL?



What is the difference between the DELETE TABLE and TRUNCATE TABLE commands in MySQL?..

Answer / 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

More MySQL Interview Questions

How many rows we can insert in a mysql table?

0 Answers  


What does mysql flush tables do?

0 Answers  


Can we store files in mysql?

0 Answers  


Is mysql owned by oracle?

0 Answers  


How to create a new view in mysql?

0 Answers  


Why do we use the mysql database server?

0 Answers  


How to enter microseconds in sql statements?

0 Answers  


How to write optimized query in mysql?

0 Answers  


How do I declare a variable in mysql?

0 Answers  


What is required to create mysql database?

0 Answers  


What is table level locking in mysql?

0 Answers  


What is a heap table?

0 Answers  


Categories