sql - Set AUTO_INCREMENT starting value in a InnoDB table to zero? -
0O1
To start counting from an InnoDB, there is someone to get the AUTO_INCREMENT field? create tab 'df_mainevent` (`idDf_MainEvent` int (11) faucet atomgriment, primary key (` idDf_MainEvent`) engine = InnoDB DEFAULT CHARSET = latin1;
MySQL documentation:
If a user specified Does the value of zero or 0 for the AUTO_INCREMENT column in INSERT, considers the INODB row as if the value was not specified and generates a new value for it.
So that means 0 is a 'special' value which is similar to zero even when you use AUTO_INCREMENT = 0, the initial value is set to 1 Will go
Starting with MySQL 5.0.3, InnoDB supports AUTO_INCREMENT = N table option support table and optional table statement, set the initial counter value or change the current counter value.
Comments
Post a Comment