Wednesday, September 28, 2011

Difference between MySQL DELETE and MySQL TRUNCATE

DELETE deletes row by row, while TRUNCATE deletes all rows at once.

For example:
DELETE * FROM table WHERE status =0;
TRUNCATE table;

No comments:

Post a Comment