Re: Auto Increment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



BTW... you only need to do it once. Subsequent INSERTS will follow on from 
the previous insert.

Owen Prime wrote:

> Gavin,
> 
> You can specify the next auto_increment id by using
> 
> SET INSERT_ID = #;
> 
> Where # is your desired number. Will only work for the next INSERT/ALTER.
> Have a look down the bottom of 7.33 in the MySQL language reference.
> 
> Cheers,
> 
> Owen
> 
> Gavin Nouwens wrote:
> 
>> Hi peoples,
>> 
>> Just wondering if it's possible with mysql to start an auto-increment
>> field at a specified number instead of 0001?
>> 
>> I could always just code it in php to add another number onto it to get
>> it to the right start point, but leaves areas for human error to creep
>> in!
>> 
>> Any help would be appreciated!
>> 
>> -gav.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux