Skip to content
Advertisement

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

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 tblTable1_Link

I am getting the following error:

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

I am sure that both the tables have same structure, same column names and same data types.

Please help!

Advertisement

Answer

They don’t have the same structure… I can guarantee they are different

I know you’ve already created it… There is already an object named ‘tbltable1’ in the database

What you may want is this (which also fixes your other issue):

Drop table tblTable1

select * into tblTable1 from tblTable1_Link
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement