下面是一个简单的Family Tree 示例: 代码如下: DECLARE @TT TABLE (ID int,Relation varchar(25),Name varchar(25),ParentID int) INSERT @TT SELECT 1,' Great GrandFather' , 'Thomas Bishop', null UNION ALL SELECT 2,'Grand Mom', 'Elian Thomas Wilson' , 1 UNION ALL SELECT 3, 'Dad', 'James Wilson',2 UNION ALL SELECT 4, 'Uncle', 'Michael Wilson', 2 UNION ALL SELECT 5, 'Aunt', 'Nan...
[ 查看全文 ]