Re: to count no of columns in a table - Mailing list pgsql-sql

From A. Kretschmer
Subject Re: to count no of columns in a table
Date
Msg-id 20060216093717.GC15433@webserv.wug-glas.de
Whole thread Raw
In response to to count no of columns in a table  (AKHILESH GUPTA <akhilesh.davim@gmail.com>)
List pgsql-sql
am  16.02.2006, um 14:43:43 +0530 mailte AKHILESH GUPTA folgendes:
> hi all,
> i just want to know one thing that is there any function in PGSQL which
> gives me the total number of columns in a table.

select count(column_name) from information_schema.columns where table_name='foo';


HTH, Andreas
-- 
Andreas Kretschmer    (Kontakt: siehe Header)
Heynitz:  035242/47215,      D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net===    Schollglas Unternehmensgruppe    === 


pgsql-sql by date:

Previous
From: Juris
Date:
Subject: Re: to count no of columns in a table
Next
From: Ragnar
Date:
Subject: Re: to count no of columns in a table