Re: [SQL] Field list from table

2004-02-29 Thread Denis
To get the list.. use SELECT a.attname as "Columns" FROM pg_attribute a, pg_class c WHERE c.relname = '' 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, Februar

Re: [SQL] Field list from table

2004-02-29 Thread rixder
On Thu, Feb 26, 2004 at 10:51:41AM +0100, Jan Pips wrote: > How can I, using SELECT, get the full list of fields from a given table? > > Pips > > Hi ! Try it: select * from table limit 0; rixder ---(end of broadcast)--- TIP 5: Have you checked

Re: [SQL] Field list from table

2004-02-26 Thread Christopher Browne
"Jan Pips" <[EMAIL PROTECTED]> wrote: > How can I, using SELECT, get the full list of fields from a given table? portfolio=# select column_name, data_type from information_schema.columns where table_catalog = 'portfolio' and table_schema = 'public' and table_name = 'stocktxns'; column_name |