invalid table alias

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:

就是说如果将表命名了别名,整个程序都要使用该别名。
阅读更多
个人分类: Sql
想对作者说点什么? 我来说一句

Alias Table

AliasTable

guolinsen123 guolinsen123

2017-07-17 20:39:43

阅读数:398

reference & alias demo

sentinel911 sentinel911

2015-05-26 19:24:29

阅读数:317

没有更多推荐了,返回首页

不良信息举报

invalid table alias

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭