207: Invalid column name(列名无效)
SQL Server含义
在表/视图中找不到查询中引用的列名。不存在该名称的列,或其不在作用域内。
原因
拼写/大小写错误、表别名错误、列尚未添加或已重命名、schema/表上下文错误,或未使用方括号(代替引号)。
解决方法
核实列名和表(检查 sys.columns 或 Object Explorer)。使用正确的别名和 schema。对于新添加的列,确保对象是最新的;必要时重新编译存储过程。对包含空格/特殊字符的名称使用方括号。
同一数据库的其他条目
- 515Cannot insert the value NULL into column(不能将值 NULL 插入列)
- 8115Arithmetic overflow error converting expression to data type(将表达式转换为数据类型时发生算术溢出错误)
- 512Subquery returned more than 1 value(子查询返回的值不止一个)
- 156Incorrect syntax near the keyword(关键字附近有语法错误)
- 2812Could not find stored procedure(找不到存储过程)
- 8623The query processor ran out of internal resources and could not produce a query plan(查询处理器耗尽了内部资源,无法生成查询计划)
- 4104The multi-part identifier could not be bound(无法绑定由多个部分组成的标识符)