Home | User-Defined Functions | Tips & Tricks | SQL Server 2005 | SQL Server 2008 | Forums | FAQ | Practice Test |    
Home > SQL Server Error Messages > Msg 110 - There are fewer 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 110 - There are fewer 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 110

Error Message:

Server: Msg 110, Level 15, State 2, Line 4
There are fewer 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 more than the number of columns specified.

To illustrate, the following INSERT statement will generate the error:

INSERT INTO [dbo].[Employees] ( [FirstName], [LastName] )
VALUES ( 'Mickey', 'Mouse', 'M' )

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: