tags:

views:

11

answers:

2
CREATE TABLE `batchinfo` (
  `rowid` int(11) NOT NULL AUTO_INCREMENT,
  `datapath` mediumtext,
  `analysistime` varchar(50) DEFAULT NULL,
  `reporttime` varchar(50) DEFAULT NULL,
  `lastcalib` varchar(50) DEFAULT NULL,
  `analystname` varchar(150) DEFAULT NULL,
  `reportname` varchar(150) DEFAULT NULL,
  `batchstate` varchar(150) DEFAULT NULL,
  `instrument` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`rowid`),
  UNIQUE KEY `rowid_UNIQUE` (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=15034 DEFAULT CHARSET=latin1

i want to start the auto incremenet from 20000

how do i do that? can i edit the table some how to start incrementing from 20000?

+4  A: 
ALTER TABLE batchinfo AUTO_INCREMENT = 20000;

See also Autoincrement

stacker
+1  A: 

I don't know how to do it from the CREATE statement, but after that you can do this:

ALTER TABLE `batchinfo` AUTO_INCREMENT = 20000;
zneak