Imagine we have a table:
create table MYTABLE (
id int IDENTITY(1,1)
,name varchar(10)
)
We have to insert a lot of rows into the table.
Does anybody know what will happen when a generated identity value oversteps a maximal integer value (2^32-1)?
You will get the following error:
Msg 8115, Level 16, State 1, Line 1
Arithmetic overflow error converting IDENTITY to data type int.
Arithmetic overflow occurred.
You won't be able to insert more records, until you:
DBCC CHECKIDENT
command,or
bigint
(suggested by Gabriel Guimarães).