Re: JDBC: what exactly does nullsAreSortedHigh() return?

Поиск
Список
Период
Сортировка
От Lee Fesperman
Тема Re: JDBC: what exactly does nullsAreSortedHigh() return?
Дата
Msg-id 40BEDB51.7757@ix.netcom.com
обсуждение исходный текст
Ответ на JDBC: what exactly does nullsAreSortedHigh() return?  (vikasrana@techie.com (Vikas Rana))
Список pgsql-general
Vikas Rana wrote:
>
> Hi all,
>
>   I am a bit confused about the method
> java.sql.DatabaseMetaData.nullsAreSortedHigh(). What exactly does this
> return? If this returns true, are nulls considered as the highest
> value? Or does this mean that nulls comes first when sorted in
> ascending order (opposite in meaning to the first).
>
> Consider this.
>
> - Oracle returns false. Nulls are last when sorted in ascending order.
>
> - MSSQL2K returns true. Nulls are first when sorted in ascending
> order.
>
> - Postgres returns true. Nulls are last when sorted in ascending
> order.
>
> Now, behavior of Oracle and Postgres is same in terms of sort order,
> but they return different values.
>
> Who is right?

It seems that the Oracle driver is wrong. I interpret nullsAreSortedHigh() the same as
Postgres.

That is, a true return from nullsAreSortedHigh() means Nulls are last when sorted in
ascending order.

This is the interpretation that FirstSQL/J uses.

--
Lee Fesperman, FirstSQL, Inc. (http://www.firstsql.com)
==============================================================
* The Ultimate DBMS is here!
* FirstSQL/J Object/Relational DBMS  (http://www.firstsql.com)

В списке pgsql-general по дате отправления:

Предыдущее
От: Derek Chen-Becker
Дата:
Сообщение: Re: JDBC: what exactly does nullsAreSortedHigh() return?
Следующее
От: brijesh@divinetaccess.com (brijesh)
Дата:
Сообщение: table content transfer from mysql to postgresql