T-SQL递归

127 阅读1分钟


 

with subjectList as (
    select * from subjects where CODE = 'zwgk'
    union all
    select subjects.* from subjectList inner join subjects on subjectList.uuid = subjects.parentUUID
)
select * from subjectList