Friday, May 16, 2008

Re: [SQL] Find all instances of a column in the entire database.

Hi depesz,

Thanks very much!
That works wonderfully well...

Is this listed in the manual anywhere? because after two hours of
reading, I didn't find it anywhere!

None the less - thanks again.


- Beau


On 16/05/2008, at 11:56 PM, hubert depesz lubaczewski wrote:

> On Fri, May 16, 2008 at 11:51:20PM +1000, Gavin 'Beau' Baumanis wrote:
>> I am hoping that you might be able to give me some assistance with
>> the
>> following task!
>> I have a database with nearly 200 tables and I need to find all
>> tables
>> that contain a column of myColumnName.
>
> select * from information_schema.columns where column_name =
> 'myColumnName';
>
> depesz

--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

No comments: