pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ross J. Reedstrom <reedstrm@rice.edu>
To: pgsql-sql@postgresql.org
Subject: Re: Selecting empty columns
Date: Tue, 28 Nov 2000 10:05:45 -0600
Message-ID: <20001128100545.B14303@rice.edu> (raw)
In-Reply-To: <3A239986.E7D70B61@cybertec.at>
References: <3A239986.E7D70B61@cybertec.at>

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.



view thread (2+ messages)

Message-ID: <20001128100545.B14303@rice.edu>
Permalink:  ../20001128100545.B14303@rice.edu/
Also on:    postgresql.org/message-id/20001128100545.B14303@rice.edu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: reedstrm@rice.edu
  Subject: Re: Selecting empty columns
  In-Reply-To: <20001128100545.B14303@rice.edu>
  References: <3A239986.E7D70B61@cybertec.at> <20001128100545.B14303@rice.edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox