T-SQL Tutorial

Msg 207 Level 16 - Invalid column name


On Transact SQL language the Msg 207 Level 16 - Invalid column name means that we have in our statement the column name misspelled.

Msg 207 Level 16 Example:

We have the table mytable.

IdName
1Object 1
2Object 2

Invalid column name:

USE model;
GO
SELECT id, name123 FROM mytable;
GO

Message
Msg 207, Level 16, State 1, Line 1
Invalid column name 'name123'.




Correct column name:

USE model;
GO
SELECT id, name FROM mytable;
GO

IdName
1Object 1
2Object 2

Other error messages: