What happens when the column is set to AUTO INCREMENT and
you reach the maximum value for that table?

Answers were Sorted based on User's Feedback



What happens when the column is set to AUTO INCREMENT and you reach the maximum value for that tab..

Answer / sanjeev b

If the AUTO_INCREMENT reaches the maximum value then we
cant insert the rows into that table. If we try to insert
the values it will produce an error saying 'Duplicate
entry 'max value(ex:4294967295)' for key1

Is This Answer Correct ?    9 Yes 0 No

What happens when the column is set to AUTO INCREMENT and you reach the maximum value for that tab..

Answer / amith

It stops incrementing. It does not overflow to 0 to prevent
data losses, but further inserts are going to produce an
error, since the key has been used already.

Is This Answer Correct ?    11 Yes 3 No

Post New Answer

More MySQL Interview Questions

What is delimiter in mysql?

0 Answers  


Why should I learn mysql?

0 Answers  


What is prepare statement in mysql?

0 Answers  


What is mysqli_num?

0 Answers  


How to Change a users password from MySQL prompt. Login as root. Set the password. Update privs.

0 Answers  






What happens when the column is set to AUTO INCREMENT and if you reach maximum value in the table?

0 Answers  


Explain advantages of InnoDB over MyISAM?

1 Answers  


What does mysql_fetch_assoc do?

0 Answers  


What is mysql used for?

0 Answers  


What is the difference between mysql and pdo?

0 Answers  


How to calculate the difference between two dates?

0 Answers  


How do I change the max connection in mysql?

0 Answers  


Categories