http://www.adp-gmbh.ch/ora/sql/connect_by.html
解决方案 »
- windows 2003 + oracle
- (爆简单.)Oracle游标循环---for与fetch
- ~~~~~急急急急急急 两个查询的 比较 高手 赐教 谢谢 ~~~~~~~~~~~
- sqlplus 窗口里设置了linesize =30, 如何使它在所有窗口中都有效
- Oracle 异常,跪求解决方法
- alter table table1 add (kyc number(20)); 出错了
- vc ado + oracle 开发 ,一次入2G 数据到一半数据量时客户端cpu利用率100% 就不再入数据了,在线等。。急。。。
- 有在P4+WINXP PRO上安装Oracle816经验请进!
- 新手求教 Oracle Database 11g Express Edition
- oracle字符串类型的时间数据进行直接比较
- 大侠们:Linux下怎么编译Proc++啊:(
- ORACLE数据库中两个表之间的数据加载问题!
prior mgr=empno
empno等于上一行的mgr
START WITH specifies the root row(s) of the hierarchy.
CONNECT BY specifies the relationship between parent rows and child rows of the hierarchy. In a hierarchical query, one expression in condition must be qualified with the PRIOR operator to refer to the parent row. For example,
... PRIOR expr = expr
or
... expr = PRIOR expr
If the CONNECT BY condition is compound, then only one condition requires the PRIOR operator. For example:CONNECT BY last_name != 'King' AND PRIOR employee_id = manager_id
In addition, the CONNECT BY condition cannot contain a subquery.PRIOR is a unary operator and has the same precedence as the unary + and - arithmetic operators. It evaluates the immediately following expression for the parent row of the current row in a hierarchical query.PRIOR is most commonly used when comparing column values with the equality operator. (The PRIOR keyword can be on either side of the operator.) PRIOR causes Oracle to use the value of the parent row in the column. Operators other than the equal sign (=) are theoretically possible in CONNECT BY clauses. However, the conditions created by these other operators can result in an infinite loop through the possible combinations. In this case Oracle detects the loop at run time and returns an error.