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?
In MS SQL Server 2000: For built-in user-defined functions that return a table, the function name must be specified with a leading double colon (::) to distinguish it from user-defined functions that are not built-in. It also must be specified as a one-part name with no database or owner qualifications.
TSQL is a query language, but it is an extension of SQL that serves Microsoft SQL Server databases and software. 8. Operations. In Structured Query language, we perform DML and DDL operations. In Transact Structured Query, there is a block of codes that used to write function and procedure.
The obvious difference is in what they are designed for: SQL is a query language used for manipulating data stored in a database. T-SQL is also a query language, but it's an extension of SQL that is primarily used in Microsoft SQL Server databases and software.
Some database systems require a semicolon at the end of each SQL statement. Semicolon is the standard way to separate each SQL statement in database systems that allow more than one SQL statement to be executed in the same call to the server. In this tutorial, we will use semicolon at the end of each SQL statement.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With