当前位置: 动力学知识库 > 问答 > 编程问答 >

sql server - What is the purpose of "::" in T-SQL

问题描述:

In (non-English) book on T-SQL (SQL Server 2005) I read about:

SELECT * FROM ::fn_helpcollations()

Though, execution of it without "::"

SELECT * FROM fn_helpcollations()

In my SQL Server 2008 R2 gives exactly the same result.

What does "::" mean in T-SQL?

网友答案:

From MSDN:

However, when you call SQL Server built-in functions that return a table, you must add the prefix :: to the name of the function:

SELECT * FROM ::fn_helpcollations()

Looks like you can omit the :: in SQL Server 2005 and 2008. The :: syntax will be supported for backward compatibility.

分享给朋友:
您可能感兴趣的文章:
随机阅读: