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

What is the difference between mysql_connect and mysqli_connect?

0 Answers  


What is the difference between myisam dynamic and myisam static in mysql?

0 Answers  


How much does mysql cost?

0 Answers  


How do we delete a row in a table?

0 Answers  


How database are managed?

0 Answers  






How to see table's field formats or description of table .

0 Answers  


How to drop an existing index in mysql?

0 Answers  


What is blob and text in mysql?

0 Answers  


Is mysql good for large database?

0 Answers  


What language is mysql written in?

0 Answers  


What is a deterministic function?

0 Answers  


What is row level locking in mysql?

0 Answers  


Categories