Re: change null to 0 in SQL script - Mailing list pgsql-sql

From Karl Raven
Subject Re: change null to 0 in SQL script
Date
Msg-id a17p72$bne$1@news.tht.net
Whole thread Raw
In response to change null to 0 in SQL script  ("Karl Raven" <lcaasia@pd.jaring.my>)
List pgsql-sql
thanks
will try it..


"ThomasR" <trx@wtal.de> wrote in message news:3C360816.1080103@wtal.de...
> Karl Raven wrote:
>
> > I like to change a null value of a query to 0 in the SQL script. I know
how
> > to do it in MS-SQL server and MS-Access but those commands does not work
in
> > pg-sql.
> >
> > Anyone has any ideas?
> >
> > Thanks
> >
>
> I think the following should work:
>
> select coalesce( my_attrib, 0 ) from my_tab
>
> Thomas
>




pgsql-sql by date:

Previous
From: "Mir S Islam"
Date:
Subject: who has lock on table/row
Next
From: Frank Bax
Date:
Subject: Re: Resources