Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Query sorting without Order by
Hello
I usually use the following trick
select distinct (field_for_sort, table_id) from table_x
This example sorts the set by field field_for_sort. In this case you can do rows only in the acsending order.
best regards,
Vasily Golikov
> Hallo all...
>
> I want to make sql query (in stored procedure) to select rows,
> and i want the selected rows automatically ordered (ascending or
> descending),
> without keyword 'order by' in the query .
> Is that possible in oracle?
> my friends told me that he ever done that in MS SQL using index
> in its table (design).
>
> Thank in advance.
>
>
Received on Mon Feb 05 2001 - 07:58:01 CST