Thread: Selecting empty columns

Selecting empty columns

From
Hans-Jürgen Schönig
Date:
How can I retrieve empty columns from a table?
The affected column is int4, some row do have values, others are empty -
how can those empty ones be retrieved and updated to 0
   Hans



Re: Selecting empty columns

From
"Ross J. Reedstrom"
Date:
On Tue, Nov 28, 2000 at 12:39:50PM +0100, Hans-Jürgen Schönig wrote:
> How can I retrieve empty columns from a table?
> The affected column is int4, some row do have values, others are empty -
> how can those empty ones be retrieved and updated to 0

UPDATE foo_table SET bar_column = 0 WHERE bar_column IS NULL;

Ross
-- 
Open source code is like a natural resource, it's the result of providing
food and sunshine to programmers, and then staying out of their way.
[...] [It] is not going away because it has utility for both the developers 
and users independent of economic motivations.  Jim Flynn, Sunnyvale, Calif.