469,610 Members | 2,110 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,610 developers. It's quick & easy.

Reset AUTO_INCREMENT

Hi *

How can reset a auto_incremet collumn so it starts from 1

TIA

Jul 19 '05 #1
2 10026
I came across this same problem in Paul DuBois's excellent book MySQL, pp.
142 - 143. The process is to drop the auto_increment column and then add it
back again:

ALTER TABLE table
DROP column,
ADD column INT UNSIGNED AUTO_INCREMENT NOT NULL,
AUTO_INCREMENT = 1;
"Nico v. Rossum" <n.*********@chello.nl> wrote in message
news:Gx**********************@amsnews03.chello.com ...
Hi *

How can reset a auto_incremet collumn so it starts from 1

TIA

Jul 19 '05 #2
I came across this same problem in Paul DuBois's excellent book MySQL, pp.
142 - 143. The process is to drop the auto_increment column and then add it
back again:

ALTER TABLE table
DROP column,
ADD column INT UNSIGNED AUTO_INCREMENT NOT NULL,
AUTO_INCREMENT = 1;
"Nico v. Rossum" <n.*********@chello.nl> wrote in message
news:Gx**********************@amsnews03.chello.com ...
Hi *

How can reset a auto_incremet collumn so it starts from 1

TIA

Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Eric Kincl | last post: by
5 posts views Thread by Paul Lamonby | last post: by
2 posts views Thread by Nico v. Rossum | last post: by
9 posts views Thread by Bart Van der Donck | last post: by
reply views Thread by Shailesh | last post: by
2 posts views Thread by hjyn | last post: by
1 post views Thread by Phil Latio | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.