Re: auto increment starting number?
Hi Shawn,
Yes, you can. You just need to pass "auto_increment=<number>" as a table creation options. See example below:
mysql> CREATE TABLE testing (
-> id int(10) unsigned NOT NULL auto_increment,
-> another_id int(10) unsigned NOT NULL default '0',
-> PRIMARY KEY (id)
-> ) auto_increment=3000;
Query OK, 0 rows affected (0.00 sec)
mysql> insert into testing values (null, 123);
Query OK, 1 row affected (0.00 sec)
mysql> select * from testing;
+------+------------+
| id | another_id |
+------+------------+
| 3000 | 123 |
+------+------------+
1 row in set (0.00 sec)
Hope that helps.
Cheers,
Joao Prado Maia
MySQL AB
Subject
Written By
Posted
September 01, 2004 12:13AM
Re: auto increment starting number?
September 01, 2004 09:37AM
September 02, 2004 08:39AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.