Restarting auto increment field value within MySQL

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
christian_phpbeginner
Forum Contributor
Posts: 136
Joined: Sat Jun 03, 2006 2:43 pm
Location: Java

Restarting auto increment field value within MySQL

Post by christian_phpbeginner »

Hello, I am sure I have read that thread here somewhere. And I have looked for it with the keyword: "Restarting auto increment".....but I don't find anything. So, if you don't mind, could you tell me how can I restart auto increment value back to 1 ?

Thank you very much,
Chris
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

(#10850)
User avatar
christian_phpbeginner
Forum Contributor
Posts: 136
Joined: Sat Jun 03, 2006 2:43 pm
Location: Java

Post by christian_phpbeginner »

Thank you very much, arborint ! Very appreciated !!

Well, I post here once again the code:

Code: Select all

alter table table_name auto_increment = 1;
Post Reply