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/...-sql-mode.html
for some discussion about how you could get a zero in there; look for
NO_AUTO_VALUE_ON_ZERO
Dan
On 9/22/06,
dpgirago@mdanderson.org <dpgirago@mdanderson.org> wrote:
>
> 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 implemented this feature.
>
> > David - there's some info in the online docs here:
> > http://dev.mysql.com/doc/refman/5.0/...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;
>
> > HTH,
> > Dan
>
> > On 9/22/06, dpgirago@mdanderson.org <dpgirago@mdanderson.org> 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.
> >>
> >> I'm using 4.0.16 and table type=myisam.
> >>
> >> David
>
>
>