Lets suppose You have executed the given query in SQL SERVER 2014.
CREATE TABLE [dbo].[Employee](
[ID] [int] PRIMARY KEY NOT NULL,
[Name] [varchar](50) NULL,
[Salary] [numeric](18, 0) NULL,
[DepartmentID] [int] NULL,
[ContactNo] [numeric](18, 0) NULL
INSERT INTO EMPLOYEE (NAME, SALARY)
Error Message :
But getting the below error.
Msg 110, Level 15, State 1, Line 1
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.
In Insert statement, There are using only two columns but In Values Clause the number of column values specified is greater than Number of Columns specified in Insert Statement that’s why It is showing an error as ‘Number of Values must match the number of columns in insert statement’.
Solution of the Error:
To avoid this type of error, Please ensure that
Number of Values which specified in Values clause = Number of columns which specified in Insert Statement
INSERT INTO EMPLOYEE (NAME, SALARY, CONTACTNO)
Now This records will be inserted into Employee Table.
If you want to sell your readymade software to the genuine clients or businessman, list your software with details and demo links.
Clients will find it using our advanced search filter and will contact you directly.
No any charge for the product lsiting.