想象一下,我们有一张桌子:
create table MYTABLE ( id int IDENTITY(1,1) ,name varchar(10) )
我们必须在表格中插入很多行。
有人知道当生成的标识值超过最大整数值(2 ^ 32-1)时会发生什么?
你会得到以下错误:
Msg 8115, Level 16, State 1, Line 1
Arithmetic overflow error converting IDENTITY to data type int.
Arithmetic overflow occurred.
您将无法插入更多logging,直到您:
DBCC CHECKIDENT命令重置身份列, bigint (由GabrielGuimarãesbuild议)。