What is the difference between the DELETE TABLE and TRUNCATE TABLE commands in MySQL?
Answer Posted / 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 View All Answers
How to shut down the server with 'mysqladmin'?
What is mysqli_num?
What is append query?
What does mysql_query return?
How to create a table?
What is the function of myisamchk?
Where the database is stored in mysql?
How can you move the master database
How can we optimize stored procedure?
How can you add and remove any column of a table?
What is mysqli_select_db?
How to list or view all databases from the mysql server.
In how many ways we can retrieve data in the result set of mysql using php?
How will show all records containing the name "sonia" and the phone number '9876543210'
What mysql means?