From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | "McCaffity, Ray (Contractor)" <McCaffityR(at)epg(dot)lewis(dot)army(dot)mil> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: if !NULL ? |
Date: | 2002-05-17 18:44:30 |
Message-ID: | 20020517114252.Y20428-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, 17 May 2002, McCaffity, Ray (Contractor) wrote:
> Is there a way to do to define a default value when doing this?
>
> something like...
>
> select distinct
> uid ....stuff...
>
> e.thingy AS Ifnull(ulk,description,'UNKNOWN'),
>
> ... more stuff ...
>
> As I want to do is have a default value of "UNKNOWN" instead of null.
Well, you can just set a default on the column, although in the
case of foreign keys the default isn't necessarily automatically
allowed unless it's NULL.
From | Date | Subject | |
---|---|---|---|
Next Message | Doug Fields | 2002-05-17 18:51:06 | Re: Force a merge join? |
Previous Message | Mark Wong | 2002-05-17 18:38:28 | OSDL Introduces OSDL-DBT-1 |