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
时间: 2024-10-13 10:36:53
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