Thread: Quick Question Please
All, Seem to be having a brain lock. What is the method or syntax to return a list of column names for a given table name ? many thanks for your quick help, Terry -- Terry L. Hampton Program Manager LimaCorp, LLC. www.limacorp.com 513.587.1874
In psql, do \d table_name It will tell you about all columns, indexes, and constraints. On Thu, 18 Dec 2003, Terry Hampton wrote: > > All, > > Seem to be having a brain lock. > > What is the method or syntax to return > a list of column names for a given table name ? > > many thanks for your quick help, > Terry > > > > -- Sam Barnett-Cormack Software Developer | Student of Physics & Maths UK Mirror Service (http://www.mirror.ac.uk) | Lancaster University
In psql: \d [table name] Regards, Sergio Pili > -----Mensaje original----- > De: Terry Hampton [SMTP:thampton@limacorp.com] > Enviado el: Jueves 18 de Diciembre de 2003 17:31 > Para: pgsql-admin@postgresql.org > Asunto: [ADMIN] Quick Question Please > > > All, > > Seem to be having a brain lock. > > What is the method or syntax to return > a list of column names for a given table name ? > > many thanks for your quick help, > Terry > > > > -- > Terry L. Hampton > Program Manager > LimaCorp, LLC. www.limacorp.com > 513.587.1874 > > > > ---------------------------(end of broadcast)--------------------------- > TIP 8: explain analyze is your friend
A solution : in psql : \d YourTable Terry Hampton wrote: > > All, > > Seem to be having a brain lock. > > What is the method or syntax to return > a list of column names for a given table name ? > > many thanks for your quick help, > Terry > > > -- Bruno LEVEQUE System Engineer SARL NET6D bruno.leveque@net6d.com http://www.net6d.com
From a psql prompt: \d <tablename> good luck, ~c Terry Hampton wrote: > > All, > > Seem to be having a brain lock. > > What is the method or syntax to return > a list of column names for a given table name ? > > many thanks for your quick help, > Terry > > > -- if i top posted, i probably did it on purpose, and yes i know my lines might trail out the right end of your mail viewer/client (but only if you have an inadequate one)