Re: Field names

From: mikeo <mikeo(at)spectrumtelecorp(dot)com>
To: "Mitch Vincent" <mitch(at)venux(dot)net>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Field names
Date: 2000-08-18 20:07:32
Message-ID: 3.0.1.32.20000818160732.00930d30@pop.spectrumtelecorp.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

try this :

select attname from pg_attribute where attrelid = (select oid from pg_class
where relname
= 'your table name') order by attnum;

you can further develop a query from this...

HTH

At 12:14 PM 8/18/00 -0700, Mitch Vincent wrote:
>I know this has been asked and answered before but I can't seem to find the
>answer anywhere..
>
>I would like to get the names of the fields in a table (not the values) in a
>query. That's possible with PostgreSQL, isn't it?
>
>Thanks!
>
>-Mitch
>

In response to

  • Field names at 2000-08-18 19:14:50 from Mitch Vincent

Browse pgsql-general by date

  From Date Subject
Next Message Darrin Ladd 2000-08-18 20:16:29 Re: PG 7.0.2 Install
Previous Message Martin Christensen 2000-08-18 19:41:12 Re: New user question -- alternate programmer interfaces?