Thread

  1. Field names

    Mitch Vincent <mitch@venux.net> — 2000-08-18T19:14:50Z

    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
    
    
    
  2. Re: Field names

    mikeo <mikeo@spectrumtelecorp.com> — 2000-08-18T20:07:32Z

    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
    >