Re: change null to 0 in SQL script

From: "Tibor Laszlo" <ltibor(at)mail(dot)tiszanet(dot)hu>
To: "Karl Raven" <lcaasia(at)pd(dot)jaring(dot)my>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: change null to 0 in SQL script
Date: 2002-01-03 15:45:38
Message-ID: NFBBJBAOELFIEKMDJAFFMEBMCDAA.ltibor@mail.tiszanet.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> I like to change a null value of a query to 0

The coalesce(something, 0) returns 0 if something is null, else returns
something.

Tibor Laszlo
ltibor(at)mail(dot)tiszanet(dot)hu

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Jason Earl 2002-01-03 16:20:17 Re: change null to 0 in SQL script
Previous Message Tom Lane 2002-01-03 15:43:30 Re: Getting Hour From a Time in Different Time Zone