How do I start auto increment from a specific point?
Solution 1:
ALTER TABLE batchinfo AUTO_INCREMENT = 20000;
See also Autoincrement
Solution 2:
See the last line of your query:
AUTO_INCREMENT=15034
Change it to:
AUTO_INCREMENT=20000
Easy as that! :)
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=20000 DEFAULT CHARSET=latin1;
INSERT INTO batchinfo (datapath) values('test');
SELECT * FROM batchinfo;
Solution 3:
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;