标签:子类 union sql union all and join sql查询 where pid
select * from [JianDu].[dbo].[ZuZhiJiGou] where id = 64 --查询节点
union all
SELECT TOP 1000 a.*
FROM [JianDu].[dbo].[ZuZhiJiGou] a join [JianDu].[dbo].[ZuZhiJiGou] b on a.pId = b.id
where a.Pid = 64
标签:子类 union sql union all and join sql查询 where pid
原文地址:http://www.cnblogs.com/sharncode/p/7141865.html