Re: mysql auto increment
| From: | Ross Honniball | Date: | Tue, 13 Jul 2004 04:14:06 +0000 |
| Subject: | Re: mysql auto increment | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-35207@lists.php.net to get a copy of this message | ||
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,. . Ross Honniball. JCU Bookshop Cairns, Qld, Australia. .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 atable 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