例如,SQL Server会警告你还是会死?
当您溢出IDENTITY列时,SQL Server 2005将抛出以下错误.
Server: Msg 8115, Level 16, State 1, Line 1 Arithmetic overflow error converting IDENTITY to data type int. Arithmetic overflow occurred.
您的标识列不必限制为INT,如果您怀疑INT不够大,实际上可以设置为BIGINT.
INT(32位签名)将达到2,147,483,647,BIGINT(64位签名)将达到9,223,372,036,854,775,807(即9个quintillion,足以满足地球上每人13亿的身份).