Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> how to select NULL first
Hi All,
Let's assume that we have a table A, columns c1, c2,.. with index c1. If you run a select:
select * from A order by c1;
rows with NULL value of c1 will be listed at the end. Is it possible to configure Oracle to have NULLs listed first?
We already tried:
select * from A order by 'A'||c1;
but it is not good. It does sort in the right order but sometimes it makes Oracle crazy. It incorectly choses executuion path and query takes forever.... :-(
Any advise?
Thanks,
Ed Received on Mon May 07 2001 - 10:33:24 CDT