Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Nulls & Order By
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