oracle 树结构查询
来源:互联网 发布:java正则表达式pattern 编辑:程序博客网 时间:2024/05/21 04:21
select *
from t_workflow_info
start with typeId in ('26','27')
connect by prior typeId=parentid
union
select *
from t_workflow_info t2
where typeId='26'
说明:
start with 必须和connect by 一起存在
其中start with用于限定第一个条件,根节点的限定条件
connect by用于限定关系查询条件 prior typeId=parentid
表示parentid和上一级的typeId相等的查询条件
/**
表结构: typeId主键,下一级别的parentId等于本级的typeID
*/
create table T_WORKFLOW_INFO
(
TYPEID NUMBER(15) not null,
WF_TYPE VARCHAR2(200) not null,
WF_DESC VARCHAR2(200),
PARENTID NUMBER(15) default 0 not null,
REMARK VARCHAR2(1000)
)
0 0
- ORACLE - 树结构查询
- Oracle树结构查询
- Oracle 树结构查询
- oracle 树结构查询
- oracle 树结构查询
- Oracle 树结构查询
- oracle树结构查询
- Oracle树结构查询
- Oracle 中树结构查询
- Oracle树结构查询[转载]
- Oracle 树型结构查询
- Oracle树结构查询[转载]
- Oracle树结构表查询
- oracle树结构节点查询
- Oracle查询树结构表
- oracle的树型结构查询
- Oracle中树结构的查询
- Oracle树结构查询(connect by ...)
- XML解析-DOM4j
- Cocos2d-x之getVisibleSize,getContentSize,boundingBox,getContentSizeInPixels,convertToGL,convertToUI
- jquer中$.post方法
- linux下查看所有用户及所有用户组
- Windows下jira安装、破解及汉化
- oracle 树结构查询
- spring quartz
- 在aix 上安装apache2.0.46
- 内核中与驱动相关的内存操作之十一(IO内存)
- swing仿qq写的群聊软件
- Makefile笔记(一)
- HttpClient 学习整理
- JEECG整合finereport快速搭建与开发
- 设计模式(四)之单例模式