Re: [GENERAL] COALESCE() or NVL()

Поиск
Список
Период
Сортировка
От Robin Thomas
Тема Re: [GENERAL] COALESCE() or NVL()
Дата
Msg-id 199806182052.NAA13301@cepheus.azstarnet.com
обсуждение исходный текст
Ответ на Re: [GENERAL] COALESCE() or NVL()  (rmcm@compsoft.com.au)
Ответы Re: [GENERAL] COALESCE() or NVL()  (Summer <summerd@cs.unm.edu>)
Список pgsql-general
At 12:03 PM 6/17/98 +0000, Jose' Soares Da Silva wrote:
>> Jose' Soares Da Silva writes:
>>  > SELECT name,NVL(salary)+100 AS dream FROM emp;
>>  > name       |dream
>>  > -----------+-----
>>  > Sam        | 1300
>>  > Claire     | 5100
>>  > Bill       | 4300
>>  > Ginger     | 4900
>>  > NULL VALUES|              <--- I expected 100 here.
>>  > (5 rows)

SELECT name, NVL(salary, 0) + 100 AS dream FROM emp;

NVL() takes two values: the column/variable, and the value to use if NULL.

--
Robin Thomas
rthomas@azstarnet.com

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

Предыдущее
От: eric@gateway.ctlno.com
Дата:
Сообщение: Help with auto-increment
Следующее
От: Michael Robinson
Дата:
Сообщение: Gracefully handling variable-length data types at the 8k limit?