SQL代码:
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
SELECT t.* FROM pt_org_info t START WITH t.id = 1 CONNECT BY t.par_id = PRIOR t.id ORDER SIBLINGS BY t.id;
效果图:
SQL代码:
SELECT t.* FROM pt_org_info t START WITH t.id = 1 CONNECT BY t.par_id = PRIOR t.id ORDER SIBLINGS BY t.id;
效果图:
转载于:https://www.cnblogs.com/s0611163/p/9994939.html