Re: Selecting empty columns - Mailing list pgsql-sql

From Ross J. Reedstrom
Subject Re: Selecting empty columns
Date
Msg-id 20001128100545.B14303@rice.edu
Whole thread Raw
In response to Selecting empty columns  (Hans-Jürgen Schönig <hs@cybertec.at>)
List pgsql-sql
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.


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Damaged table "pg_access"
Next
From: Bernie Huang
Date:
Subject: Re: a script that queries db periodically