For example, will SQL Server warn you or does it just die?
views:
224answers:
2
+16
A:
SQL Server 2005 will throw the following error when you overflow the IDENTITY column.
Server: Msg 8115, Level 16, State 1, Line 1
Arithmetic overflow error converting IDENTITY to data type int.
Arithmetic overflow occurred.
Your identity column need not be constrained to an INT and indeed can be set to BIGINT if you suspect that INT will not be large enough.
INT (32-bit signed) will go up to 2,147,483,647 and BIGINT (64-bit signed) to 9,223,372,036,854,775,807 (that's 9 quintillion, enough for 1.3 billion id's per person on the planet).
joshperry
2008-12-19 00:15:11