Re: Selecting empty columns

Поиск
Список
Период
Сортировка
От Ross J. Reedstrom
Тема Re: Selecting empty columns
Дата
Msg-id 20001128100545.B14303@rice.edu
обсуждение исходный текст
Ответ на Selecting empty columns  (Hans-Jürgen Schönig <hs@cybertec.at>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Damaged table "pg_access"
Следующее
От: Bernie Huang
Дата:
Сообщение: Re: a script that queries db periodically