Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.
Moderator: General Moderators
hairyjim
Forum Contributor
Posts: 219 Joined: Wed Nov 13, 2002 9:04 am
Location: Warwickshire, UK
Post
by hairyjim » Wed Nov 17, 2004 7:46 am
Hi all,
Is it possible to auto increment a field, but instead of starting from 1 I want it to start from 44403707. Is this possible?
Last edited by
hairyjim on Wed Nov 17, 2004 9:12 am, edited 1 time in total.
CoderGoblin
DevNet Resident
Posts: 1425 Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany
Post
by CoderGoblin » Wed Nov 17, 2004 8:51 am
Using which Database system....
phpScott
DevNet Resident
Posts: 1206 Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.
Post
by phpScott » Wed Nov 17, 2004 8:52 am
yes just insert a value into your auto increment column along with the rest of the record
ie 12849, bob, smith
next record will auto_increment to 12850
hairyjim
Forum Contributor
Posts: 219 Joined: Wed Nov 13, 2002 9:04 am
Location: Warwickshire, UK
Post
by hairyjim » Wed Nov 17, 2004 9:12 am
Whoops yeah sorry. MySQL.
Cheers Scott - I should have thought of that!
Wayne
Forum Contributor
Posts: 339 Joined: Wed Jun 05, 2002 10:59 am
Post
by Wayne » Wed Nov 17, 2004 9:19 am
You can specify the start value of the auto_increment column when you create the table, check your MySQL manual regarding table creation and auto_increment columns.