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 do I connect to mysql database?
What are the technical features of MySQL?
How do I start mysql from command line?
How to change a password for an existing user via mysqladmin?
Is mysql server free?
What is a scalar function?
What are the differences between binary and varbinary?
What are the applications required to support mysql?
Does mysql need a server?
What are Heap tables?
What is pragma autonomous_transaction?
How to display top 10 rows in mysql?
How do I create a new database in mysql?
What is mysql and how it works?
Table - Products has number of products as below Productid ProductName 1 iPhone 2 iPad 3 BlackBerry Table - SalesPersonProduct has the below records Salespersonid productid S1 1 S1 2 S1 3 S2 1 S3 2 Write a SQL query that returns the total number of sold products