Wednesday, December 5, 2007

SQL Server 2008 introduces new data type : HierarchyId

I think this introduction of new data type is to help to re-construct the records back to hierarchical view easily (remember the "Using APPLY" sample that need to call the function recursively ?). With the syntax like GetAncestor(), GetDescendant(), IsDescendant() , etc, you can discover the level of the records easily (why it seems gearing towards CLR coding??).

There're few articles with samples:

  1. SQL Server 2008 - HierarchyID - Part I
  2. SQL Server 2008 - HierarchyID - Part II

The CTP version of MS SQL 2008 can be downloaded from here.

No comments: