Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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

In response to


pgsql-sql by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group