What will happen if the MySQL AUTO_INCREMENT column reaches the upper limit of the data type?

MySQLMySQLi Database

When the AUTO_INCREMENT column reaches the upper limit of data type then the subsequent effort to generate the sequence number fails. That is why it is advised to use a large enough integer data type for the AUTO_INCREMENT column to hold the maximum sequence value required by us. For example, if we will use TINYINT then AUTO_INCREMENT would be able to generate only 127 sequence numbers and in case of UNSIGNED TINYINT, this value can be extended up to 255.

raja
Published on 19-Feb-2018 13:09:01
Advertisements