Re: mysql auto increment

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

 



I just had a bit of a play with it and discovered you can do this:

say your auto-increment index is named 'fred' for arguments sake.

INSERT INTO table SET FRED = 1000

This will just create a record where the auto-index fred will equal 1000.

Next auto-increment, NOT specifying a value for 'fred', will be 1001.

No idea if there are any dangerous side-effects. Perhaps others will know?

At 09:19 AM 13/07/2004, you wrote:
Hello,

I know this is more of a mysql question then php with mysql but I can not find the answer. I have a primary key in a
table the is setup and working with auto increment.


Now I want to change it so it will start auto incrementing from 1000. So each entry will be:

1001, then 1002, ....


-- Michael Gale Network Administrator Utilitran Corporation

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

. . Ross Honniball. JCU Bookshop Cairns, Qld, Australia. .

--
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