Обсуждение: How to Get Column Names from the Table

Поиск
Список
Период
Сортировка

How to Get Column Names from the Table

От
venkat
Дата:
Dear All,

   How to get Column Names from Table in PostgreSQL.

Thanks and Regards,

Venkat

Re: How to Get Column Names from the Table

От
Viktor Bojović
Дата:
\d tableName

On Wed, Jul 7, 2010 at 11:08 AM, venkat <ven.tammineni@gmail.com> wrote:
Dear All,

   How to get Column Names from Table in PostgreSQL.

Thanks and Regards,

Venkat



--
---------------------------------------
Viktor Bojović
---------------------------------------
Wherever I go, Murphy goes with me

Re: How to Get Column Names from the Table

От
"A. Kretschmer"
Дата:
In response to venkat :
> Dear All,
> 
>    How to get Column Names from Table in PostgreSQL.

select column_name from information_schema.columns where table_name = 'your_table';


Regards, Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431  2EB0 389D 1DC2 3172 0C99


Re: How to Get Column Names from the Table

От
venkat
Дата:
Thanks alot Andreas...It is working fine...

Thanks again.


Venkat

On Wed, Jul 7, 2010 at 2:44 PM, A. Kretschmer <andreas.kretschmer@schollglas.com> wrote:
In response to venkat :
> Dear All,
>
>    How to get Column Names from Table in PostgreSQL.

select column_name from information_schema.columns where table_name = 'your_table';


Regards, Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431  2EB0 389D 1DC2 3172 0C99

--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Re: [GENERAL] How to Get Column Names from the Table

От
Jayadevan M
Дата:
> Use:

> \d tablename

And what I really like about it is the way you can make a guess about the
table name and use * .

postgres-# \d mt*
      Table "public.mt1"
 Column |  Type   | Modifiers
--------+---------+-----------
 id     | integer |


      Table "public.mt2"
 Column |  Type   | Modifiers
--------+---------+-----------
 id     | integer |


      Table "public.mt3"
 Column |  Type   | Modifiers
--------+---------+-----------
 id     | integer |

Regards,
Jayadevan





DISCLAIMER:

"The information in this e-mail and any attachment is intended only for
the person to whom it is addressed and may contain confidential and/or
privileged material. If you have received this e-mail in error, kindly
contact the sender and destroy all copies of the original communication.
IBS makes no warranty, express or implied, nor guarantees the accuracy,
adequacy or completeness of the information contained in this email or any
attachment and is not liable for any errors, defects, omissions, viruses
or for resultant loss or damage, if any, direct or indirect."






Re: [GENERAL] How to Get Column Names from the Table

От
venkat
Дата:
Dear Sreelatha.

  It is working fine. Thanks alot.

Thanks and Regards,

Venkat

On Wed, Jul 7, 2010 at 3:42 PM, Sreelatha G <sreetlatha@gmail.com> wrote:
Hi,
 
To get column names only
 
 select column_name from information_schema.columns where table_name='captor_prime_aggregates';

Thanks
Sreelatha
On Wed, Jul 7, 2010 at 2:44 PM, Viktor Bojović <viktor.bojovic@gmail.com> wrote:
\d tableName


On Wed, Jul 7, 2010 at 11:08 AM, venkat <ven.tammineni@gmail.com> wrote:
Dear All,

   How to get Column Names from Table in PostgreSQL.

Thanks and Regards,

Venkat



--
---------------------------------------
Viktor Bojović
---------------------------------------
Wherever I go, Murphy goes with me


Re: [GENERAL] How to Get Column Names from the Table

От
AI Rumman
Дата:
Use:

\d tablename


On Wed, Jul 7, 2010 at 3:08 PM, venkat <ven.tammineni@gmail.com> wrote:
Dear All,

   How to get Column Names from Table in PostgreSQL.

Thanks and Regards,

Venkat

Re: [GENERAL] How to Get Column Names from the Table

От
Sreelatha G
Дата:
Hi,
 
To get column names only
 
 select column_name from information_schema.columns where table_name='captor_prime_aggregates';

Thanks
Sreelatha
On Wed, Jul 7, 2010 at 2:44 PM, Viktor Bojović <viktor.bojovic@gmail.com> wrote:
\d tableName


On Wed, Jul 7, 2010 at 11:08 AM, venkat <ven.tammineni@gmail.com> wrote:
Dear All,

   How to get Column Names from Table in PostgreSQL.

Thanks and Regards,

Venkat



--
---------------------------------------
Viktor Bojović
---------------------------------------
Wherever I go, Murphy goes with me