Re: Columns view? (Finding column names for a table)

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Columns view? (Finding column names for a table)
Date: 2008-02-06 20:43:44
Message-ID: fod660$23s$1@ger.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Steve Midgley wrote on 06.02.2008 21:33:
> Hi,
>
> I see this documentation item but can't figure out how to use it:
>
> http://www.postgresql.org/docs/8.2/interactive/infoschema-columns.html
>
>> The view columns contains information about all table columns (or view
>> columns) in the database.

select column_name
from information_schema.columns
where table_name = 'table_name'

works for me.

Thomas

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message PostgreSQL Admin 2008-02-06 21:01:09 Double query
Previous Message Steve Midgley 2008-02-06 20:33:25 Columns view? (Finding column names for a table)