oracle connect by用法
2015-12-07 20:10
525 查看
就不转载原文了,来个更加简单易懂的说法.有数据表 a:no upno010102 0101010101 01010101 0101select * from a start with no='010101' connect by no=prior upno;查询结果为:010101010101将upno和no换个位置:select * from a start with no='0101' connect by upno=prior no;查询结果为:0101010101010102注:
select * from emp connect by upno=prior no start with no=
'0101'
;
//与select * from a start with no='0101' connect by upno=prior no;效果一致
与select * from emp connect by prior upno=no start with no='0101';效果相反
重点在于prior的位置
原文:http://www.cnblogs.com/linjiqin/p/3152690.html:select * from a start with no='010101' connect by no=prior upno;
相关文章推荐
- oracle内存管理技术
- 关于Oracle的高水平线
- PL/SQL(Oracle)如何写入日志文件和读取文件
- oracle 体系结构初步认识(一)
- 在电脑上上安装了Oracle 11g R2,在用Navicat去连接Oracle时,提示以下错误:
- oracle系列--解锁数据库
- ORACLE调用接口(OCI)简介及重要函数流程介绍
- Oracle10G/11G官方下载地址集合 直接迅雷下载
- SQL(Oracle)
- Oracle 11G DataGuard重启详细过程~~
- Oracle 动态设置SEQUENCE startwith 的值
- Oracle 12C -- 清空audit记录
- Oracle 12C -- 删除audit policy
- Oracle 12C -- 预定义audit policies
- oracle 优化方案
- Oracle重装后出错
- Oracle内存管理技术
- oracle 插入时间
- oracle数据文件recover恢复过程
- Oracle根据身份证号码判断性别