Set auto increment start value to 1000?
am 05.05.2006 10:21:53 von Brian BendtsenHi
Is there at way to reset a table and set the auto increment value to 1000?
/Brian Bendtsen
Hi
Is there at way to reset a table and set the auto increment value to 1000?
/Brian Bendtsen
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;
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"
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