SQL递归查询(with cte as)
with cte as(select Id,Pid,DeptName,0 as lvl from Departmentwhere Id = 2union allselect d.Id,d.Pid,d.DeptName,lvl+1 from cte c inner join Department don c.Id = d.Pid)select * from cte 表结构: Id ...
SQL递归查询(with cte as)
本文转载http://www.cnblogs.com/xqhppt/archive/2011/02/15/1955366.html with cte as( select Id,Pid,DeptName,0 as lvl from Department &nbs...
本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。