Re: [SQL] to count no of columns in a table

2006-02-16 Thread Ragnar
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 t

Re: [SQL] to count no of columns in a table

2006-02-16 Thread A. Kretschmer
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, Andrea

Re: [SQL] to count no of columns in a table

2006-02-16 Thread Juris
Create view/storedproc on pg_class & pg_attribute tables 2006/2/16, AKHILESH GUPTA <[EMAIL PROTECTED]>: > 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. > OR > just like we are using count(*), it gives us to

[SQL] to count no of columns in a table

2006-02-16 Thread AKHILESH GUPTA
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. 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 plz help me