;with cte as( select id,caption,parentid,1 Gen from skywfflow where parentid =0 UNION ALL select a.id,a.caption,a.parentid,cte.gen+1 Gen from skywfflow a inner join cte on a.parentid=cte.id ) select * from cte
posted on
2015-10-21 14:48东篱南山
阅读(179)
评论(0)
编辑收藏举报