27,582
社区成员




;with myT2 as(
select * from 表名 Where 根节点查询条件
union all
select 表名.* from myT2 inner join 表名 on myT2.ID=表名.ParentID)
select * from myT2
with myT3 as(
select * from 表名 Where 根节点查询条件
union all
select 表名.* from myT2 inner join 表名 on myT2.ID=表名.ParentID)
select * from myT3