Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: NULLS FIRST option in CREATE INDEX?
"Ganesh Raja" <ganesh_at_gtfs-gulf.com> wrote in message news:<1055206226.914685_at_cswreg.cos.agilent.com>...
> Select * From (
> select * from table where key_expr is null
> union all
> select * from table where key_expr is not null)
> Order By 1
>
> See if this Helps...
>
Ganesh,
Thanks....Your sql should probably work, but then so will my first SQL which is simpler. But the point of my inquiry is not the production of any working SQL. I think you might need to read my original message which started off this thread. I have a fairly large table with several columns some of which are nullable and form parts of composite indexes. I need the DBMS to read the table through the index and return the result row by row to my application. Without using any temporary tables (as your SQL would) and without doing any sort (as your SQL would). For nullable columns, the null values should come first in the ordering. The problem with Oracle is that in its index ordering, the nulls come last. Is there any workaround to this...is it possible to force Oracle to change the ordering at the index creation stage?
A.A. Received on Tue Jun 10 2003 - 07:49:51 CDT