当前位置: 移动技术网 > IT编程>数据库>Oracle > Oracle树结构查询按层级排序

Oracle树结构查询按层级排序

2018年11月21日  | 移动技术网IT编程  | 我要评论

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;
view code

 效果图:

 

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网