469,148 Members | 1,548 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Set auto increment start value to 1000?

Hi

Is there at way to reset a table and set the auto increment value to 1000?

/Brian Bendtsen
May 5 '06 #1
2 117603
Brian Bendtsen wrote:
Is there at way to reset a table and set the auto increment value to 1000?


truncate tablename;
insert into tablename (id) values(999);
delete from tablename where id=999;
May 5 '06 #2
JJ
To start with an AUTO_INCREMENT value other than 1, you can set that value
with CREATE TABLE or ALTER TABLE, like this:

mysql> ALTER TABLE tbl AUTO_INCREMENT = 1000;

"Brian Bendtsen" <br*@mentor-it.dk> wrote in message
news:44***********************@dread15.news.tele.d k...
Hi

Is there at way to reset a table and set the auto increment value to 1000?

/Brian Bendtsen

May 18 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Tom | last post: by
mmarif4u
reply views Thread by mmarif4u | last post: by
1 post views Thread by CARIGAR | last post: by
1 post views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.