Arithmetic overflow error converting expression to data type int in SQL Server
As per the Microsoft documentation on the int data type, it only supports values between -2,147,483,648 and 2,147,483,647, while you are trying to insert a value of 9,415,536,635, which is outside of this range.
If the value really needs to be numeric, consider using bigint:
create table #Student_details11
(
ROLL_NO int,
[NAME] varchar(25),
[ADDRESS] varchar(25),
PHONE int,
AGE int
)
However, if the PHONE column is intended to store a phone number, you’d probably be better using a text-type such as varchar as suggested in the comments:
create table #Student_details11
(
ROLL_NO int,
[NAME] varchar(25),
[ADDRESS] varchar(25),
PHONE varchar(10),
AGE int
)
Read more here: Source link
