T-SQL Tutorial

Msg 121 Level 15 - INSERT statement


Transact SQL - the Msg 121 Level 15 - The select list for the INSERT statement contains more items than the insert list. The number of SELECT values must match the number of INSERT columns.

Msg 121 Level 15 Example:

Invalid insert:

USE model;
GO
insert into Customers(id,Name,City)
select 14, 18, Name, City from Students where id=7;
GO

Message
Msg 121, Level 15, State 1, Line 3
The select list for the INSERT statement contains more items than the insert list. The number of SELECT values must match the number of INSERT columns.




Correct insert:

USE model;
GO
insert into Customers(id,Name,City)
select 14, Name, City from Students where id=7;
GO

Other error messages: