Re: if !NULL ?

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: if !NULL ?
Дата
Msg-id 20020517114252.Y20428-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Re: if !NULL ?  ("McCaffity, Ray (Contractor)" <McCaffityR@epg.lewis.army.mil>)
Список 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.


В списке pgsql-general по дате отправления:

Предыдущее
От: Mark Wong
Дата:
Сообщение: OSDL Introduces OSDL-DBT-1
Следующее
От: Doug Fields
Дата:
Сообщение: Re: Force a merge join?