Re: Getting all tables which contains a specific column name

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Getting all tables which contains a specific column name
Date: 2009-04-22 06:59:59
Message-ID: 20090422065959.GB9695@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

In response to Ridvan Lakas ng Bayan S. Baluyos :
> Hi list,
>
> How do I get all the tables which contains a specific column name? For example,
> I want to get all tables that has an `is_active` column in them?

select table_schema, table_name from information_schema.columns where
column_name = 'is_active';

Regards, Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Robert Campbell 2009-04-22 12:18:43 Workaround for bug #4608?
Previous Message Ridvan Lakas ng Bayan S. Baluyos 2009-04-22 06:48:05 Re: Getting all tables which contains a specific column name