Re: ** HELP ** How to get the number of columns of tables;
From: Singapore Airlines Ltd <engsys_at_singnet.com.sg>
Date: 1996/05/21
Message-ID: <4nrle9$mf0_at_lantana.singnet.com.sg>#1/1
Date: 1996/05/21
Message-ID: <4nrle9$mf0_at_lantana.singnet.com.sg>#1/1
MCC (duffy_at_cais2.cais.com) wrote:
: I would like to count the numbers of columns for every tables in the
: database. Instead of using DESCRIBE to get the columns for each table and
: count them, is there any smarter way of doing this?
:
:
: Thanks for your help,
: MCC
Hi,
you can use
SELECT Table_name, max(Column_Id) "NO OF COLUMNS"
FROM user_tab_columns
GROUP BY Table_name
Hope this helps.
Lakshmi Prasad Received on Tue May 21 1996 - 00:00:00 CEST