Re: NULL values

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Mark Muffett <markm(at)muffett(dot)net>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: NULL values
Date: 2001-07-10 19:41:24
Message-ID: Pine.LNX.4.30.0107102129030.677-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mark Muffett writes:

> Is there a Postgresql equivalent to the Oracle NVL( ) function, which
> allows a SELECT statement to fill in default values if a column is
> NULL?

COALESCE(x1, x2, x3, ...)

returns the first xn that is not null.

--
Peter Eisentraut peter_e(at)gmx(dot)net http://funkturm.homeip.net/~peter

In response to

Browse pgsql-general by date

  From Date Subject
Next Message ryan.a.roemmich 2001-07-10 19:49:08 RE: index skipped in favor of seq scan.
Previous Message Joseph Shraibman 2001-07-10 19:40:12 Re: Re: Backups WAS: 2 gig file size limit