SQL Server 2008 Books Online (October 2009)
Tutorial: Using the hierarchyid Data Type

This tutorial is intended for users who are experienced with Transact-SQL, but are new to the hierarchyid data type.

What You Will Learn

This tutorial is divided into two lessons:

Lesson 1: Converting a Table to a Hierarchical Structure

In this lesson, you take an existing employee table that is structured as a parent/child hierarchy and move the data into a new table that represents the hierarchy by using the hierarchyid data type. This lesson requires the AdventureWorks sample database.

Lesson 2: Creating and Managing Data in a Hierarchical Table

In this lesson, you create a table by using the hierarchyid data type to represent the hierarchy structure. Then, you manipulate the data in the table by using the hierarchical methods.

Requirements

Your system must have the following installed:

  • Any edition of SQL Server 2008.
  • Either SQL Server Management Studio or Management Studio Express.
  • Internet Explorer 6 or a later version.
Bb677213.note(en-us,SQL.100).gifNote:
When you review the tutorials, we recommend that you add the Next and Previous buttons to the document viewer toolbar. For more information, see Adding Next and Previous Buttons to Help.

See Also

Concepts

Using hierarchyid Data Types (Database Engine)

Other Resources

Tutorial: Getting Started with the Database Engine
Tutorials
Tutorial: Writing Transact-SQL Statements
hierarchyid Data Type Method Reference
hierarchyid (Transact-SQL)

Help and Information

Getting SQL Server 2008 Assistance
Tags :


Page view tracker