MySQL Forums
Forum List  »  Newbie

Re: truncate table-auto increment values
Posted by: Rick James
Date: April 08, 2014 04:38PM

AUTO_INCREMENT=1 is a clause on ALTER TABLE. Look at the online documentation for ALTER TABLE, which refers to CREATE TABLE. Do ALTER after doing TRUNCATE.

Or (an this might make more sense), do these (instead of TRUNCATE + ALTER):
DROP TABLE ...
CREATE TABLE ...
In this case you won't need the AUTO_INCREMENT clause.

Options: ReplyQuote


Subject
Written By
Posted
Re: truncate table-auto increment values
April 08, 2014 04:38PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.