问题描述:

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.

相关阅读:
Top