关闭

invalid table alias

396人阅读 评论(0) 收藏 举报
分类:

If an alias is assigned to a table, all explicit references to the table in the Transact-SQL statement must use the alias, not the table name. For example, the following SELECT generates a syntax error because it uses the name of the table when an alias has been assigned:

SELECT Sales.Customer.CustomerID, /* Illegal reference to Sales.Customer. */
    s.Name
FROM Sales.Customer AS c
JOIN Sales.Store AS s
ON c.CustomerID = s.BusinessEntityID ;

If an alias is assigned to a table, all explicit references to the table in the Transact-SQL statement must use the alias, not the table name. For example, the following SELECT generates a syntax error because it uses the name of the table when an alias has been assigned:

就是说如果将表命名了别名,整个程序都要使用该别名。
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:65632次
    • 积分:1417
    • 等级:
    • 排名:千里之外
    • 原创:68篇
    • 转载:54篇
    • 译文:0篇
    • 评论:6条
    最新评论