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

H.Lefebvre <hlefebvre@easynet.fr>

From: "H.Lefebvre" <hlefebvre@easynet.fr>
To: pgsql-hackers@postgreSQL.org
Date: 1998-12-09T14:56:12Z
Lists: 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