I'm using a MySQL database. I have set an auto_increment function on "ID" column (which is also set as Primary key).
What will happen when it reaches its maximum possible value, according to the data type set for that column?
Can someone help me out what to do in such cases? Will it be handled automatically? Or will I have to handle it?
Best Answer
While inserting single record (by both INSERT .. VALUES and INSERT .. SELECT) you will obtain
While inserting multiple records you will obtain (even when only one of them causes overflow)
fiddle
No. You must handle it - and the best way is to solve this issue before it occures.
PS. If you are interested in to know what messages will be produced while inserting record(s) by LOAD DATA/XML you may test it by yourelf.