Re: ** HELP ** How to get the number of columns of tables;

From: Reid Lai <reidlai_at_hk.super.net>
Date: 1996/05/19
Message-ID: <4nn77v$njo_at_tst.hk.super.net>#1/1


duffy_at_cais2.cais.com (MCC) 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
You can reference table SYS.ALL_TAB_COLS as follows :

SELECT COUNT(*) FROM SYS.ALL_TAB_COLS WHERE OWNER = 'table_owner' AND TABLE_NAME = 'table_name' ; Received on Sun May 19 1996 - 00:00:00 CEST

Original text of this message