Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

sqldatasource dal, wwwxxxenden, convert raid5 to raid 10 mdadm, apache force chunked, nrao wwwxxx, xxxxxdup, procmail change subject header, wwwXxx not20, Wwwxxx.doks sas, linux raid resync after reboot

Links

XODOX
Impressum

#1: Set auto increment start value to 1000?

Posted on 2006-05-05 10:21:53 by Brian Bendtsen

Hi

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

/Brian Bendtsen

Report this message

#2: Re: Set auto increment start value to 1000?

Posted on 2006-05-05 18:48:37 by Aggro

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;

Report this message

#3: Re: Set auto increment start value to 1000?

Posted on 2006-05-18 06:54:39 by 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" <brb@mentor-it.dk> wrote in message
news:445b0b4a$0$47080$edfadb0f@dread15.news.tele.dk...
> Hi
>
> Is there at way to reset a table and set the auto increment value to 1000?
>
> /Brian Bendtsen

Report this message