SQL Server Insert query throws an arithmetic overflow error converting expression to data type int error

gstyhher  于 2023-06-21  发布在  其他
关注(0)|答案(1)|浏览(164)
insert into SignUpForm 
values ('Torito', 9984537856, 'toritom@gmail.com', 'Torito@123')

I am trying to run the above query but it will throw this error:

Msg 8115, Level 16, State 2, Line 1
Arithmetic overflow error converting expression to data type int.

Please give me the appropriate solution for this.

I created the table with the following datatypes.

name varchar(50)
mobile bigint
mail varchar(50) 
password varchar(50)

insert into SignUpForm 
values ('Torito', 9984537856, 'toritom@gmail.com', 'Torito@123')
k97glaaz

k97glaaz1#

looks like the order of column value not matching with column order present in table.

the values needs to be in order of columns present in your table. e.g.

INSERT INTO TABLE_NAME (ID, NAME, EMAIL) VALUES ('ID','Name','Email')`

try with this, if error persist then need to investigate further..

相关问题