Re: query on multiple tables in schema

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: query on multiple tables in schema
Дата
Msg-id 20041001183059.GB20624@wolff.to
обсуждение исходный текст
Ответ на query on multiple tables in schema  (Angus Berry <angus.berry@elken.com>)
Список pgsql-admin
On Tue, Sep 28, 2004 at 17:19:20 -0400,
  Angus Berry <angus.berry@elken.com> wrote:
> Hi, I wonder if anyone can help.
>
> I'd like to execute a SQL query that performs an action on all the
> (unrelated) tables that I select. The following query doesn't work, but
> the subselect (which works) shows what I'm trying to do. All tables have
> an identical column called id_num.
>
> delete from
> (select tablename from pg_tables where schemaname = 'public')
> where id_num = null

id_num = null will always return NULL which is not TRUE so that no rows
will be selected for deletion. Try using IS NULL instead.

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Uwe C. Schroeder"
Дата:
Сообщение: Re: PLEASE GOD HELP US!
Следующее
От: Steve Crawford
Дата:
Сообщение: Re: PLEASE GOD HELP US!