START WITH...CONNECT BY 学习!
来源:互联网 发布:平面设计相关软件 编辑:程序博客网 时间:2024/05/17 04:12
1.注意比较两个语句的区别
--查找某个管理者下的员工,根据找到的empno展开
SELECT *
FROM SCOTT.EMP
START WITH mgr = 7566
connect BY PRIOR empno =mgr
--根据找到的mgr展开--和下面的语句结果一样
SELECT *
FROM SCOTT.EMP
START WITH mgr = 7566
connect BY empno =PRIOR mgr
SELECT *
FROM SCOTT.EMP
START WITH mgr = 7566
connect BY PRIOR mgr = empno
2.继续理解
--把找到的empno当做mgr继续查找(empno)
SELECT t.*,LEVEL
FROM SCOTT.EMP t
START WITH mgr = 7566
connect BY PRIOR empno =mgr
-- 把找到的mrg当做empno继续查找(mgr)
SELECT t.*,LEVEL
FROM SCOTT.EMP t
START WITH mgr = 7566
connect BY PRIOR mgr =empno
3.oracle文档相关资料
START WITH specifies the root row(s) of the hierarchy.
CONNECT BY specifies the relationship between parent rows and child rows of the hierarchy.
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries003.htm#i2060615
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries003.htm#sthref3132
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/operators004.htm#sthref871
- START WITH...CONNECT BY 学习!
- start with connect by
- start with connect by
- start with connect by
- connect by/start with
- start with connect by
- connect by prior start with
- connect by prior start with
- connect by…start with...
- CONNECT BY PRIOR... START WITH
- connect by prior start with
- Start With......Connect by prior..
- Oracle Connect By Start With
- start with connect by prior
- start with ... connect by ...练习
- connect by prior...start with...
- start with ... connect by prior ...
- start with ... CONNECT BY PRIOR
- js search match indexof
- ubuntu 10.10 屏幕闪的解决方法
- 《.NET 4.0面向对象编程漫谈》勘误表(2011年1月14日更新)
- 无题
- Java生成随机字符串的代码
- START WITH...CONNECT BY 学习!
- ASP.NET 3.5路由总结篇
- phpmyadmin登录问题和require出现乱码
- Chapter 6 -- SystemC From Gound 读书心得
- 关于dvd subtitle与effect效果有冲突问题(thinkvd开发日志)
- Linux-2.6.30内核在TE2410上的移植
- .NET引用类型与值类型
- VisualSVN server安装及使用 转
- 淘宝专卖去除办法