SQL别名语法检查 [英] SQL Alias Syntax check

查看:103
本文介绍了SQL别名语法检查的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我正在尝试别名我的桌子..我设置别名后......我无法从别名表中检索信息。 ..任何帮助..



从EmployeeInfo中选择*作为C

接下来我正在尝试执行C

从C中选择*



C没有写任何记录..错误:找不到任何对象..

Hi all,

I am trying to alias my table..After I set a alias name..I can''t retrive information from alias table...Any help..

Select * from EmployeeInfo as C
Next I am trying to execute C
Select * from C

C is not writing any records ..Error: No object found..

推荐答案





别名并不意味着您拥有永久别名,它将在运行时用于特定查询执行。



如果您需要使用其他名称访问它,那么您可以进行查看或同步。



http://msdn.microsoft.com/en-us/library/ms187455(v=sql.105)。 aspx [ ^ ]


它不像这样工作。别名用于相同的查询,不会将影响转移到其他查询。即使它在SP中,别名也适用于单个查询。你上面有两个单独的查询。



在这里阅读更多相关信息: MSDN:使用表别名 [ ^ ]
It does not work like this. Aliases are for the same query and does not transfer the affect on other queries. Even if it is in an SP, aliases are for one single query. What you have above are two separate queries.

Read more about it here: MSDN: Using Table Aliases[^]


这篇关于SQL别名语法检查的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆