4

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)?

Timofey
  • 145
  • 1
  • 7

1 Answers1

4
  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.

  2. You won't be able to insert more records, until you:

Marek Grzenkowicz
  • 464
  • 1
  • 9
  • 14