| Home > SQL
Server Error Messages > Msg 109 - 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. |
| SQL
Server Error Messages - Msg 109 - 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. |
|
|
Error Message:
Server: Msg 109, Level 15, State 1, Line 4
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' )
Solution/Workaround:
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' )
|
|
Related Topics:
|
|
|