Set auto increment start value to 1000?

Set auto increment start value to 1000?

am 05.05.2006 10:21:53 von Brian Bendtsen

Hi

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

/Brian Bendtsen

Re: Set auto increment start value to 1000?

am 05.05.2006 18:48:37 von 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;

Re: Set auto increment start value to 1000?

am 18.05.2006 06:54:39 von 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" 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