oracle 树
来源:互联网 发布:mac系统ps字体怎么安装 编辑:程序博客网 时间:2024/06/05 22:43
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;
如果connect by prior中的prior被省略,则查询将不进行深层递归。
如:
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;
如:
- Oracle 树
- oracle 树
- ORACLE输出树
- oracle SQL树查询
- Oracle树的使用
- oracle的树
- oracle树查询
- ORACLE 树结构
- ORACLE - 树结构查询
- oracle树结构
- ORACLE故障树
- Oracle 树的应用
- oracle 遍历树
- oracle树递归查询
- Oracle树结构查询
- oracle 树查询
- ORACLE 树查询
- Oracle树查询
- js arguments, jcallee caller 用法
- HADOOP学习(一)——部署篇
- 我是一个初出大学校园的准程序员
- OpenGL学习笔记 (4) —— 旋转
- 【转载】强大的计算机工作面试笔试题目...【与中国文学紧密结合】(带非标准答案)
- oracle 树
- 转java.lang.Instrument初探
- Android语音识别
- jquery 对象级插件学习第二步
- Ext上传文件的一些总结
- common lisp 学习笔记
- 近期要做的一些事和体会
- 兄弟走了
- CentOS 5.5 中 Python 升级到 2.6.5