SQL:
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
select * from PT_ORG_INFO START WITH id='102' CONNECT BY PRIOR id=par_id
连表递归查询SQL:
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
select info.* from PT_CAMERA_INFO info join (select * from PT_ORG_INFO START WITH id='102' CONNECT BY PRIOR id=par_id) org on org.id=info.org_id where 1=1
SQL:
select * from PT_ORG_INFO START WITH id='102' CONNECT BY PRIOR id=par_id
连表递归查询SQL:
select info.* from PT_CAMERA_INFO info join (select * from PT_ORG_INFO START WITH id='102' CONNECT BY PRIOR id=par_id) org on org.id=info.org_id where 1=1
转载于:https://www.cnblogs.com/s0611163/p/7238801.html