SQL Error:-Arithmetic overflow error converting expression to data type int Error(Msg 8115) in SQL Server
SQL Error No:-Msg 8115
To recreate this issue, I have created a test table testOverflow.
create table testOverflow(
column1 int,
column2 int)
=> To test if the normal insert works, I am inserting some random numbers into the table. and the insert is successful
Insert into testOverflow values(1111111,2222222)
=> Now I am increasing the length of column2 values as shown in the below query,
Insert into test11 values(1111111,22222222222)
and with this, overflow error occurs.
Error message:
Msg 8115, Level 16, State 2, Line 9
Arithmetic overflow error converting expression to data type int.
The statement has been terminated.