摘要:
父/子使用父/子方法时,每一行都包含对父级的引用。下表定义了一个用于在父/子关系中包含父行和子行的典型表:复制代码USE AdventureWorks2008R2 ;GOCREATE TABLE ParentChildOrg(BusinessEntityID int PRIMARY KEY,ManagerId int REFERENCES ParentChildOrg(BusinessEntityID),EmployeeName nvarchar(50) ) ;GO针对一些常见操作比较父/子与 hierarchyid使用 hierarchyid 进行子树查询时速度明显加快。使用 hierarc 阅读全文