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

Why is it called mysql?

0 Answers  


If we create a column with data type VARCHAR(3), what would we expect to see in MySQL table?

2 Answers   ABC,


Consider a scenario where you have to send an email to a client from the sql database. How do you think you can achieve this task?

0 Answers  


What is difference between statement and preparedstatement?

0 Answers  


How to write optimized query in mysql?

0 Answers  






how to declare unique key in creating a table..?

2 Answers  


Which is best pdo or mysqli?

0 Answers  


How to validate email addresses in mysql?

0 Answers  


What is mysqli_connect_error ()?

0 Answers  


What is a mysql model?

0 Answers  


What is the command used to create a database using php and mysql?

0 Answers  


How to write query to select word java's from column employees and from emp table

1 Answers   CGI,


Categories