List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:May 31 1999 1:37pm
Subject:Re: Auto increment field to start at 0
View as plain text  
>I am trying to get an integer auto increment field to start at 0 and it
>keeps starting at 1, any ideas.
>
>I have tried
>
>job_number int(11) DEFAULT '0' NOT NULL AUTO_INCREMENT
>
>But whenever I insert a row job_number starts at 1

AUTO_INCREMENT series values start at 1.  This cannot change without
changing the programming interface, because the last_insert_id()
function, which returns the most recently-generated AUTO_INCREMENT
value in the current session, returns 0 if no such values have yet
been generated.

--
Paul DuBois, paul@stripped
Northern League Chronicles: http://www.snake.net/nl/
Thread
Auto increment field to start at 0Derek Lavine31 May
  • Re: Auto increment field to start at 0Paul DuBois31 May