| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: SELECT & recursion
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
![]() |
![]() |