Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: SELECT & recursion

Re: SELECT & recursion

From: vc <boston103_at_hotmail.com>
Date: 21 Mar 2006 12:34:58 -0800
Message-ID: <1142973298.069657.236610@e56g2000cwe.googlegroups.com>

Bart Wakker wrote:
[...]

> select * from hier_tab start with id=x
> connect by prior id=parent
>
> 'prior id' means the one coming 'before' the child, which is the parent,
> i.e. in this fashion you search from child to parent.
>
> you can also search from parent to all its descendants (children, grand
> children etc):
>
> select * from hier_tab start with id=x
> connect by prior parent=id
>
> will give you the entire tree below some parent

You are confused -- the way 'connect by' behaves in your examples is just the opposite to what you've described. Received on Tue Mar 21 2006 - 14:34:58 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US