Re: searching a value in a variable/field in all tables in a schema

Поиск
Список
Период
Сортировка
От Ruiqiang Chen
Тема Re: searching a value in a variable/field in all tables in a schema
Дата
Msg-id CA+yjgPR0v24o+_cjD-3ukQSXgsEWWog6amQ-ssjUnnUFfVERVQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: searching a value in a variable/field in all tables in a schema  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general
Thanks! 

On Thu, Aug 30, 2018 at 4:51 PM David G. Johnston <david.g.johnston@gmail.com> wrote:
On Thu, Aug 30, 2018 at 1:44 PM, Ruiqiang Chen <chenrq2005@gmail.com> wrote:

Does anyone have experience of searching a value in a variable/field in all tables in a schema? 

 
SELECT 'Tbl1'::text AS loc, fld
FROM schema.tbl1
WHERE fld = 'value'
[UNION ALL
SELECT 'Tbl2'::text AS loc, fld
FROM schema.tbl2
WHERE fld = 'value'
...]

David J.

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

Предыдущее
От: "a"
Дата:
Сообщение: Re: Ways to deal with large amount of columns;
Следующее
От: Tim Cross
Дата:
Сообщение: Re: Ways to deal with large amount of columns;