| From: | "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu> | 
|---|---|
| To: | pgsql-sql(at)postgresql(dot)org | 
| Subject: | Re: Selecting empty columns | 
| Date: | 2000-11-28 16:05:45 | 
| Message-ID: | 20001128100545.B14303@rice.edu | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | 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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bernie Huang | 2000-11-28 17:53:55 | Re: a script that queries db periodically | 
| Previous Message | Tom Lane | 2000-11-28 15:06:38 | Re: Damaged table "pg_access" |