sql递归查询语句

sql Bom 递归查询:

with t as(
select * from Department where id=6
union all
select a.* from Department a,t where a.ParentId=t.id)
select * from t

原文地址:https://www.cnblogs.com/huaqiqi/p/5748316.html