Thread: NULL values
A simple question:
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?
Thanks for any help
Mark Muffett
On Tue, Jul 10, 2001 at 06:45:29PM +0100, Mark Muffett <markm@muffett.net> wrote: > A simple question: > > Is there a Postgresql equivalent to the Oracle NVL( ) function, which allows a SELECT statement to fill in default valuesif a column is NULL? coalesce will return the first nonnull argument.
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@gmx.net http://funkturm.homeip.net/~peter