For example, will SQL Server warn you or does it just die?
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With