Re: replace NULL

Поиск
Список
Период
Сортировка
От Gaetano Mendola
Тема Re: replace NULL
Дата
Msg-id 005501c1e076$f9f60fe0$5ce8fea9@GMENDOLA2
обсуждение исходный текст
Ответ на replace NULL  ("Kancha ." <kancha2np@yahoo.com>)
Ответы Re: replace NULL  (Torbjörn Andersson <tobbe@embryo.se>)
Список pgsql-sql
"Kancha ." <kancha2np@yahoo.com> wrote:
> Hello
> 
> i want to run a select query on a table. eg:
> 
> select age from people;
> 
> if age is NULL then I want to replace it by some text,
> say "SHY" so the output is like
> 
> name age
> me   10
> jane SHY
> jack 32
> 
> how do i make this replacement of null value to some text

UPDATE people
SET age = 'SHY'
WHERE age IS NULL;


I hope that the field age is a text field;


Ciao
Gaetano

-- 
#exclude <windows>
#include <CSRSS>
printf("\t\t\b\b\b\b\b\b");.
printf("\t\t\b\b\b\b\b\b");



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

Предыдущее
От: "Christopher Kings-Lynne"
Дата:
Сообщение: Re: Help To Out
Следующее
От: Rajesh Kumar Mallah
Дата:
Сообщение: Postgresql goes into recovery mode ....