Question : Insert Error: Column name or number of supplied values does not match table definition.

There are 2 table, table "user_table_a" and table "user_table_b", which are the same except that table "user_table_b" has 1 more column than table "user_table_a". I use this SQL statement to copy all of the content from table "user_table_a" to table "user_table_b". i get the error: "Insert Error: Column name or number of supplied values does not match table definition."

SQL statement: insert into user_table_b select * from user_table_a

Would somebody please tell me how to solve ? THanks

Answer : Insert Error: Column name or number of supplied values does not match table definition.

If the columns don't match, you need to explicitly code the select/insert:

insert into user_table_b (column1,column2,column3)   select column1,column2,column3 from user_table_a
Random Solutions  
 
programming4us programming4us