title | description | author | ms.author | ms.date | ms.service | ms.subservice | ms.topic | dev_langs | |
---|---|---|---|---|---|---|---|---|---|
:: (Scope Resolution) (Transact-SQL) |
:: (Scope Resolution) (Transact-SQL) |
rwestMSFT |
randolphwest |
03/06/2017 |
sql |
t-sql |
reference |
|
[!INCLUDE SQL Server Azure SQL Managed Instance]
The scope resolution operator :: provides access to static members of a compound data type. A compound data type is one that contains multiple simple data types and methods. Compound data types include the built-in CLR types and custom SQLCLR User-Defined Types (UDTs).
The following example shows how to use the scope resolution operator to access the GetRoot()
member of the hierarchyid
type.
DECLARE @hid hierarchyid;
SELECT @hid = hierarchyid::GetRoot();
PRINT @hid.ToString();
[!INCLUDEssResult]
/