Re: How to find a column name

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: lrnr <ns(at)nospam(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: How to find a column name
Date: 2004-09-18 14:14:56
Message-ID: 200409181614.56806.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

lrnr wrote:
> For example, I want to find all columns that have a name containing
> the string 'USER', in any table. How can I do this?

SELECT * FROM information_schema.columns WHERE column_name LIKE
'%USER%';

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tim Penhey 2004-09-18 15:09:38 pg_restore peculiarities
Previous Message Marc G. Fournier 2004-09-18 13:39:03 Re: Mail delivery failed: returning message to sender