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

Can mysql scale horizontally?

0 Answers  


What is sqlyog?

0 Answers  


What is mysql data directory? How to determine the location of the data directory?

0 Answers  


What is the data source name for mysql?

0 Answers  


What is the difference between MyISAM Static and MyISAM Dynamic?

0 Answers  






How can we run batch mode in mysql?

0 Answers  


what is collation? how many types of installations in sql server?

3 Answers  


Write a command to list all databases in mysql?

0 Answers  


In which format data is stored in mysql database?

0 Answers  


What is the difference between mysql_fetch_assoc and mysql_fetch_array?

0 Answers  


Is mysql good for big data?

0 Answers  


How do I restart mysql on windows?

0 Answers  


Categories