How do I specify a starting value for use with AUTO_INCREMENT?
example create table script:
CREATE TABLE egtable (
egcolname INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
etc,etc,etc);
In place of starting the numbering at 1, I may like to start the numbering at 10000.
Any advice will be appreciated. Thank you.
-Dickey
Starting Value for AUTO_INCREMENT
Moderator: General Moderators
Code: Select all
ALTER TABLE tbl_name AUTO_INCREMENT = 10000;as a php statement you would do this normally:
Code: Select all
<?
$query = "ALTER TABLE tbl_name AUTO_INCREMENT = 10000";
$result = mysql_query($query);
?>