with recursive t1(dept_id, parent_id, alias_name) as (
select t0.dept_id, t0.parent_id, t0.alias_name
from sys_dept t0
where t0.status = ‘0’
and t0.dept_id = ‘a0eb68b7ca1c4a1091a3ab23a2a0b3a2’
and t0.del_flag = 0
union all
select t2.dept_id, t2.parent_id, t2.alias_name
from t1 oo join sys_dept t2 ON t2.dept_id=oo. parent_id
) select * from t1
查询父级节点的sql