Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 30, 2018 at 1:44 PM, Ruiqiang Chen <chenrq2005@xxxxxxxxx> 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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux