Re: AW: [HACKERS] isnull() or is it?t

Поиск
Список
Период
Сортировка
От H.Lefebvre
Тема Re: AW: [HACKERS] isnull() or is it?t
Дата
Msg-id 366E8F8C.9BA27BA4@easynet.fr
обсуждение исходный текст
Ответ на AW: [HACKERS] isnull() or is it?t  (Zeugswetter Andreas IZ5 <Andreas.Zeugswetter@telecom.at>)
Ответы Re: AW: [HACKERS] isnull() or is it?t  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-hackers
Zeugswetter Andreas IZ5 wrote:
> 
>         > isnull() is on our TODO list.
> 
>         It should be called NVL() from "Null VaLue" like in Oracle and
> Informix.
>         isnull() would suggest a boolean return value to me.
> 


With SyBase, IsNull(X,Y) returns X if X is not null, and Y
if X is null.

Example:

SELECT reference, name, IsNull(price, 0.00)
FROM t_items


reference      name           price
------------ --------------- -------
W95          Windows95        190.00
WNT400       Windows NT 4.0   490.00
LX           Linux              0.00


rather than:

SELECT reference, name, price,
FROM t_items


reference      name           price
------------ --------------- -------
W95          Windows95        190.00
WNT400       Windows NT 4.0   490.00
LX           Linux             NULL


--
H.Lefebvre


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

Предыдущее
От: Zeugswetter Andreas IZ5
Дата:
Сообщение: AW: [HACKERS] isnull() or is it?t
Следующее
От: "Chris Williams"
Дата:
Сообщение: Error with table that exists but postgres says it doesn't