16
Insert error: column name or number of supplied values does not match table definition.
This error occurs when there is a mismatch between the information specified in an insert statement and the definition of the table. Following are some examples of insert statements for the pubs2.titles table that cause this error (assuming that the titles table has nine columns):
No column names are specified after the table name in an insert statement and there are two or more columns in the table.
1> insert titles values ('this is a test') 2> go
Msg 213, Level 16, State 4: Line 1: Insert error: column name or number of supplied values does not match table definition.
No values are specified in an insert statement.
1> insert titles (title_id, title) values () 2> go
Msg 213, Level 16, State 3: Line 1: Insert error: column name or number of supplied values does not match table definition.
Check your insert statement to make sure you have specified column names and values for the columns.
All versions