Re: to count no of columns in a table

Поиск
Список
Период
Сортировка
От Ragnar
Тема Re: to count no of columns in a table
Дата
Msg-id 1140082836.32324.38.camel@localhost.localdomain
обсуждение исходный текст
Ответ на to count no of columns in a table  (AKHILESH GUPTA <akhilesh.davim@gmail.com>)
Список pgsql-sql
On fim, 2006-02-16 at 14:43 +0530, AKHILESH GUPTA wrote:
> 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.
> OR
> just like we are using count(*), it gives us total number or rows in a
> table, just like i want to know the total number of columns present in
> the table

this is the kind of thing the information_schema is for

  select count(*) from information_schema.columns
                  where table_name='x';


gnari



В списке pgsql-sql по дате отправления:

Предыдущее
От: "A. Kretschmer"
Дата:
Сообщение: Re: to count no of columns in a table
Следующее
От: Antal Attila
Дата:
Сообщение: VIEWs and TEMP tables problem