Re: table column names - search

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Cc: "Marcin Krawczyk" <jankes(dot)mk(at)gmail(dot)com>
Subject: Re: table column names - search
Date: 2008-01-14 17:24:11
Message-ID: 200801141824.12322.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Am Montag, 14. Januar 2008 schrieb Marcin Krawczyk:
> Hi all. I would like to know if there's a way to obtain a list of tables
> containing specified column name? Using standard LIKE '%string' syntax
> would be great.

SELECT table_schema, table_name FROM information_schema.columns WHERE
column_name LIKE '%name%';

Add DISTINCT and other columns to taste.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Marcin Krawczyk 2008-01-14 18:30:49 Re: table column names - search
Previous Message Marcin Krawczyk 2008-01-14 16:38:10 table column names - search