Oracle Consulting Oracle Training Oracle Support Development
Home
Catalog
Oracle Books
SQL Server Books
IT Books
Job Interview Books
eBooks
Rampant Horse Books
911 Series
Pedagogue Books
SQL Server Books
Oracle Software
image
image
Write for Rampant
Publish with Rampant
Rampant News
Rampant Authors
Rampant Staff
  Phone
  252-431-0050
Oracle News
Oracle Forum
Oracle Tips
Articles by our Authors
Press Releases
image
image

Oracle 11g Books

Oracle tuning

Oracle training

Oracle support

Remote Oracle

STATSPACK Viewer

    Privacy Policy

 

   
  Oracle Tips by Burleson

Oracle10g connect_by_root

The unary operator connect_by_root is only valid in hierarchical queries. When a column is qualified with this operator, Oracle returns the column value using data from the root row. This operator is intended to extend the functionality of the CONNECT BY [PRIOR] condition of hierarchical queries.

There is one restriction on the connect_by_root clause - this operator cannot be specified in the START WITH condition or the CONNECT BY condition.

SQL> SELECT ename "Employee", CONNECT_BY_ROOT empno "Root", LEVEL,

  2  SYS_CONNECT_BY_PATH(ename,'/')  "Path" FROM scott.emp

  3  WHERE level <= 3 AND deptno = 10 START WITH ename='KING'

  4* CONNECT BY NOCYCLE PRIOR empno = mgr AND LEVEL <= 4

 

Employee        Root      LEVEL Path

-------------- -----  --------- ------------------

KING            7839          1 /KING

CLARK           7839          2 /KING/CLARK

MILLER          7839          3 /KING/CLARK/MILLER


Get the complete Oracle10g story:

The above text is an excerpt from "Oracle Database 10g New Features: Oracle10g Reference for Advanced Tuning and Administration", by Rampant TechPress.  Written by top Oracle experts, this book has a complete online code deport with ready to use scripts. 

To get the code instantly, click here:

http://www.rampant-books.com/book_2003_2_oracle10g.htm

http://rampant-books.com/book_2003_2_audit.htm

 

Download your Oracle scripts now:

www.oracle-script.com

The definitive Oracle Script collection for every Oracle professional DBA

 

Linux Oracle commands syntax poster

wise Oracle tuning software

Oracle data dictionary reference poster

Oracle Forum

BC Oracle consulting support training

BC remote Oracle DBA   

 

   

OracleŽ is the registered trademark of Oracle Corporation. SQL ServerŽ is the registered trademark of Microsoft Corporation.
Many of the designations used by computer vendors to distinguish their products are claimed as Trademarks