Column name or number of supplied values does not match table definition

前端 未结 12 1827
轮回少年
轮回少年 2020-11-29 04:33

In SQL server, I am trying to insert values from one table to another by using the below query:

delete from tblTable1

insert into tblTable1 select * from tb         


        
12条回答
  •  感动是毒
    2020-11-29 05:01

    For me the culprit is int value assigned to salary

    Insert into Employees(ID,FirstName,LastName,Gender,Salary) values(3,'Canada', 'pa', 'm',15,000)

    in salary column When we assign 15,000 the compiler understand 15 and 000.

    This correction works fine for me. Insert into Employees(ID,FirstName,LastName,Gender,Salary) values(4,'US', 'sam', 'm',15000)

提交回复
热议问题