Jump to content

Archived

This topic is now archived and is closed to further replies.

OriginalSunny

Deleteing all data from table??

Recommended Posts

Use truncate or a delete without specifying a "where" clause. See:

[a href=\"http://dev.mysql.com/doc/refman/4.1/en/delete.html\" target=\"_blank\"]http://dev.mysql.com/doc/refman/4.1/en/delete.html[/a]

[a href=\"http://dev.mysql.com/doc/refman/4.1/en/truncate.html\" target=\"_blank\"]http://dev.mysql.com/doc/refman/4.1/en/truncate.html[/a]

FYI: You could also drop and recreate the table.

Share this post


Link to post
Share on other sites
You should be aware the TRUNCATE will reset the auto-increment counters, which DELETE will not.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.