SQL Server Error Messages - Msg 109¶
Error Message¶
Server: Msg 109, Level 15, State 1, Line 1
There are more columns in the INSERT statement than values specified in the VALUES clause.
The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.
Causes¶
As the error message describes, this error occurs when doing an INSERT to a table using the INSERT INTO ... VALUES format and the number of values specified in the VALUES clause is less than the number of columns specified.
To illustrate, the following INSERT statement will generate the error:
INSERT INTO [dbo].[Employees] ( [FirstName], [LastName], [Gender] )
VALUES ( 'Mickey', 'Mouse' )
As can be seen from this INSERT INTO ... VALUES statement, there are 3 columns specified in the INSERT INTO clause but only 2 values are specified in the VALUES clause.
Solution / Work Around :¶
To avoid this error, make sure that the number of values specified in the VALUES clause matches the number of columns specified in the INSERT INTO clause:
INSERT INTO [dbo].[Employees] ( [FirstName], [LastName], [Gender] )
VALUES ( 'Mickey', 'Mouse', 'M' )