Oracle树查询
2024-09-06 12:24:09
1、Oracle函数 sys_connect_by_path
语法: select sys_connect_by_path(column_name,'connect_symbo链接标志l') from table
start with ... connect by prior
写法:connect by prior column1 = column2 或者 connect by column2 = prior column1 写法都可以,
主要看prior写在谁的前面,prior写在谁的前面谁就作为父级值(参照值)
例:
select sys_connect_by_path(ghdm,'-') from gh_ghdm start with ghdm = 22333 connect by prior ghdm = sjghdm
select sys_connect_by_path(ghdm,'-') from gh_ghdm start with ghdm = 22333 connect by ghdm = prior sjghdm
相关链接https://www.cnblogs.com/supermandy/p/7873233.html
最新文章
- Spring整合Redis
- Comparison method violates its general contract 关于jdk自带算法问题
- HTML5——同步购物车
- JAVA 正则表达式、汉字正则、 java正则代码
- Checking For User Permissions Before Updating or Inserting The Records in Oracle Forms
- list,set,map,数组之间的相互转换详细解析
- UVa 10316 - Airline Hub
- input子系统分析
- DECIMAL Data Type
- thecorner.com.cn - Customer Care
- curl几个选项
- 微信小程序实例教程(三)
- struts2遇到的一个问题。
- UOJ#419. 【集训队作业2018】圆形(格林公式)
- PPT定时器小记
- HDU1599(Floyd最小环)
- 【转】C/C++函数调用过程分析
- php hash算法
- C++模板源代码的三种组织方式
- UVC调试
热门文章
- JDK源码阅读--String
- PAT甲级——A1105 Spiral Matrix【25】
- Swagger发布服务器时错误 500 : { ";Message";: ";An error has occurred."; }
- PKU 百炼OJ 简单密码
- 2019-8-26-当-ASP.NET-Core-链接找不到时可能的原因
- locate,find,df,mount,du命令
- Mysql8+mybatisGenerator (mysql 8的逆向工程)
- 19-10-23-K-Aft
- 安卓手机--键盘谈起后 fixed背景图片被键盘顶起的问题
- CCS开发指南