oracle connect by 和start with
网上找了个例子 测试了一下 貌似明白了
create table t2(
root_id number,
id number,
name varchar(5),
description varchar(10)
);
insert into t2(root_id,id,name,description) values(0,1,'a','aaa');
insert into t2(root_id,id,name,description) values(1,2,'a1','aaa1');
insert into t2(root_id,id,name,description) values(1,3,'a2','aaa2');
insert into t2(root_id,id,name,description) values(0,4,'b','bbb');
insert into t2(root_id,id,name,description) values(4,5,'b1','bbb1');
insert into t2(root_id,id,name,description) values(4,6,'b2','bbb2');
select * from t2 start with root_id = 0 connect by prior id = root_id
select * from t2 start with id = 1 connect by prior id = root_id;
select * from t2 start with id = 4 connect by prior id = root_id;
select * from t2 start with root_id = 0 connect by id = root_id;
select * from t2 start with id = 1 connect by id = root_id;
最新文章
- Codeforces Round #363 (Div. 2)A-D
- Centos 6 安装 epel yum库
- eclipse不能识别虚拟机的问题
- java学习笔记 --- 面向对象3
- 在JS事件封装时,addEventListener()方法的this问题
- Java开发必须掌握的线上问题排查命令
- 织梦dede如何获取图集调用第一张图片完美解决方法【5.7sp2版本】
- Swagger2 添加HTTP head参数
- Spring AOP 配置通知方法的时候如何处理方法重载
- VisualSVN 手动记录访问操作日志
- 【Atcoder yahoo-procon2019-qual D】	Ears
- zabbix监控k8s出现的pod error status
- Eth-Trunk链路聚合配置
- C# string和byte[]的转换
- html lang属性
- 如何在 Ubuntu 和 CentOS 上启用 Nginx 的 HTTP/2 协议支持
- 如何在CentOS 7上使用vsftpd(FTP)的配置文件介绍
- MySQL------如何卸载与安装
- java-mybaits-00401-Mapper-输入输出
- Loadrunner 11检查点使用方法总结