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

Home -> Community -> Usenet -> c.d.o.server -> Re: Ordering of Hierarchical trees by level 1 id

Re: Ordering of Hierarchical trees by level 1 id

From: praveen <prsingh_at_ipolicynet.com>
Date: 14 Jul 2004 22:48:27 -0700
Message-ID: <17e9bade.0407142148.64acb62f@posting.google.com>


Andy Hassall <andy_at_andyh.co.uk> wrote in message news:<2t8af0ph3kcg0mot9nlom2l3amagvf497h_at_4ax.com>...
> On 13 Jul 2004 03:16:34 -0700, prsingh_at_ipolicynet.com (praveen) wrote:
>
> >I have a table which has a parent child relation represented
> >hierachically. I want to run a query to get all trees ordered within
> >themselves and also ordered at top level. In other words all trees
> >should be ordered by the START WITH id.
>
> Look into the ORDER SIBLINGS BY clause.

ORDER SIBLINGS BY Only orders the siblings of a tree, but does not ensure ordering of all trees by their START WITH id. I have been runnning this query and its returning correct results all the time. I think if PK/index is used in any equailty operator then the result set is ordered by the PK. This could be the only reason for the ordered result set. I have read in forums that oracle 7 and above support this implicit ordering feature if index is used in some equality operator. COULD SOMEONE VERIFY THIS THEORY. Received on Thu Jul 15 2004 - 00:48:27 CDT

Original text of this message

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