David - there's some info in the online docs here:
http://dev.mysql.com/doc/refman/5.0/en/example-auto-increment.html
Specifically:
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 = 100;
Thanks, Dan, but I can't get it to work. Defining a column like this:
a int not null auto_increment=0 primary key
throws an error, and while the alter table statement seems to work ok,
whether the table is empty or not, it has no effect on subsequent inserts.
I'm wondering if 4.0.16 has not
OK. If you assign to auto_increment any number higher than what currently
exists in the column, it changes the value and the incremented sequence
from that point. But apparently you can't assign the value zero to the
column, even if the table is empty.
Thanks, Dan, but I can't get it to work.
I just tried it in 5.0.21, and found that it fails silently with zero
(0). Works with 100. I did specify int, not unsigned int, in my test
table.
See http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html
for some discussion about how you could get a zero in there; look for
At 14:16 -0500 9/22/06, [EMAIL PROTECTED] wrote:
I seem to recall that when creating a table, you could designate an
auto_increment field to begin counting at zero(0) instead of one (1), but I
can't find an example in the documents.
Don't store 0 in an AUTO_INCREMENT column.
--
Paul DuBois,
At 14:16 -0500 9/22/06, [EMAIL PROTECTED] wrote:
I seem to recall that when creating a table, you could designate an
auto_increment field to begin counting at zero(0) instead of one (1),
but I
can't find an example in the documents.
Don't store 0 in an AUTO_INCREMENT column.
Thanks Dan