Returns the root of the hierarchy tree. GetRoot() is a static method.
SQL Server return type:hierarchyid
CLR return type:SqlHierarchyId
Used to determine the root node in a hierarchy tree.
The following example returns the root of the hierarchy tree:
SELECT OrgNode.ToString() AS Text_OrgNode, *
FROM HumanResources.EmployeeDemo
WHERE OrgNode = hierarchyid::GetRoot()
The following code snippet calls the GetRoot() method:
hierarchyid Data Type Method Reference
Hierarchical Data (SQL Server)
hierarchyid (Transact-SQL)