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

Home -> Community -> Usenet -> c.d.o.misc -> Nulls & Order By

Nulls & Order By

From: Joy Hsu <jhsu_at_informatica.com>
Date: 4 Mar 2003 18:28:48 -0800
Message-ID: <3e420c9e.0303041828.638e3f94@posting.google.com>


Hi,

I'm using java.sql.DatabaseMetaData.nullsAreSortedHigh() to check if the nulls are sorted as the highest values, but the method seems to return the wrong value : false. It should be true since Oracle has NULLS LAST as the default for ascending order. The SQL I have is like 'Select field FROM table ORDER BY 1' and the null values are at the end of the returned resultset. Anyone has experience using this method or knows why I got the wrong value? or is there some other way to get this info?

I don't want to use NULLS FIRST/LAST because we have different databases to support. It would be easier if I can get this info in database metadata.

Thanks,
Joy Received on Tue Mar 04 2003 - 20:28:48 CST

Original text of this message

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