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

Is mysql workbench a dbms?

0 Answers  


What is pragma serially_reusable and why is it used?

0 Answers  


How to enter microseconds in sql statements?

0 Answers  


What are the functions of mysql?

0 Answers  


What are procedures in mysql?

0 Answers  






What is dbms in mysql?

0 Answers  


How can we get the number of rows affected by query?

0 Answers  


How do you prevent MySQL from caching a query?

1 Answers  


What's the latest version of mysql?

0 Answers  


What is the maximum length of a table name, database name, and fieldname in MySQL?

3 Answers   Accenture, Pioneer, TISL,


How do I make an action query?

0 Answers  


What are the differences between binary and varbinary?

0 Answers  


Categories