摘要:
--查询Id为1的所有子节点层数的数量;with cte as ( select id,parentId,0 as Leave from _TestLeave where id = 1 --要查询的节点 union all select a.id,a.parentId,b.Leave + 1 as Leave from _TestLeave a join cte b on a.parentId... 阅读全文
posted @ 2018-05-26 08:50
达者均为师
阅读(1414)
评论(0)
推荐(0)
浙公网安备 33010602011771号