Re: replace NULL - Mailing list pgsql-sql

From Gaetano Mendola
Subject Re: replace NULL
Date
Msg-id 005501c1e076$f9f60fe0$5ce8fea9@GMENDOLA2
Whole thread Raw
In response to replace NULL  ("Kancha ." <kancha2np@yahoo.com>)
Responses Re: replace NULL  (Torbjörn Andersson <tobbe@embryo.se>)
List 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 by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: Re: Help To Out
Next
From: Rajesh Kumar Mallah
Date:
Subject: Postgresql goes into recovery mode ....