To get the list.. use 

SELECT a.attname as "Columns"
FROM  pg_attribute a, pg_class c
WHERE c.relname = '<YOUR_TABLE_NAME>'
  AND a.attnum > 0 AND a.attrelid = c.oid
ORDER BY a.attnum

Thanx

Denis


----- Original Message ----- 
From: "Jan Pips" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 26, 2004 3:21 PM
Subject: [SQL] Field list from table


> How can I, using SELECT, get the full list of fields from a given table?
> 
> Pips
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to [EMAIL PROTECTED] so that your
>       message can get through to the mailing list cleanly



---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to