2 messages in com.mysql.lists.win32Re: restoring value
FromSent OnAttachments
Alberto. Sartori28 Mar 2002 08:38 
phalen orion28 Mar 2002 10:18 
Subject:Re: restoring value
From:phalen orion (por@hotmail.com)
Date:03/28/2002 10:18:50 AM
List:com.mysql.lists.win32

<< Hi to all. Anyone can help me about restoring the value of a primary key field? I've created a database and a table with a primary key using this sintax (sql):

create table test(id int not null auto_increment, primary key(id), ecc...

During the test I've insert and deleted some records. I need to restore to 0 the value of the primary key. How? Thanks!

Alb >>

Issue the "use <database>;" command, then "alter table <table> modify auto_increment <new auto_increment value>;"

There MIGHT be an = sign between auto_increment and the new value, I don't remember the syntax for sure.