SQL Server 查询树结构的表,查询一个节点的所有子节点
时间:2021-07-01 10:21:17
帮助过:45人阅读
;
with cte
as
2 (
3 select * from Associator
where No
= ‘mc1007‘
4 union all
5 select air.
* from Associator
as air
inner join cte
on air.ParentNo
= cte.No
6 )
7 select * from cte;
SQL Server 查询树结构的表,查询一个节点的所有子节点
标签:技术 nbsp pre tor style blog 分享 images sso