Thread: Get name of columns in a table
Hi everybody!
Is it possible to get thecoluns names of an a table in the database with a sql
query??
Thanks, a lot.....
Is it possible to get thecoluns names of an a table in the database with a sql
query??
Thanks, a lot.....
On Fri, 27 Jul 2001, [iso-8859-1] Mar�a Elena Hern�ndez wrote: > Is it possible to get thecoluns names of an a table in the database with a sql > query?? "psql -E" will show the SQL commands that psql internally uses to display tables, database, etc. Once in psql, use "\d table_name" to see fields in a table and the SQL behind that. -- Joel Burton <jburton@scw.org> Director of Information Systems, Support Center of Washington
María Elena Hernández wrote: > To get a list of columns, run "psql -E" and do a standard "\df foo" where foo is your table name. This will show you exactly how PG does it. I've found this very useful with all the backslash commands. HTH - Richard Huxton