--递归获取所有子节点with temp as(select * from MK_Base_Department where F_DepartmentId='5f258320-c1b7-42a4-b2fe-cafbd7a190ba'union allselect a.* from MK_Base_Department a,temp b where a.F_ParentId=b.F_DepartmentId)select * from temp
本文共 279 字,大约阅读时间需要 1 分钟。
--递归获取所有子节点with temp as(select * from MK_Base_Department where F_DepartmentId='5f258320-c1b7-42a4-b2fe-cafbd7a190ba'union allselect a.* from MK_Base_Department a,temp b where a.F_ParentId=b.F_DepartmentId)select * from temp
转载于:https://www.cnblogs.com/lovejunjuan/p/11058462.html