Re: number of columns in a table?
From: Tim Irvin <irvin_at_lmsc.lockheed.com>
Date: 1996/08/14
Message-ID: <irvin-1408960826520001_at_butch.lmsc.lockheed.com>#1/1
Date: 1996/08/14
Message-ID: <irvin-1408960826520001_at_butch.lmsc.lockheed.com>#1/1
[posted and mailed]
In article <3210E4A8.41C6_at_curagen.com>, Charlene Liang <cliang_at_curagen.com> wrote:
> Hi,
>
> We would like to know if we can get information such as number of
> columns in a table from PL/SQL?
>
> Or if we can loop through dbms_sql.define_column to exhaust all the
> colomns?
>
> Any suggestion is appreciated.
Try this:
select count(*)
from dba_tab_columns
where table_name='TABLE_NAME'
and owner='TABLE_OWNER';
-- Tim Irvin, HP-UX Miracle Worker and Oracle Guy Lockheed Martin Missiles and Space, Sunnyvale, California e-mail: irvin_at_lmsc.lockheed.com voice: (408) 742-0440 ************ all standard disclaimers apply ************Received on Wed Aug 14 1996 - 00:00:00 CEST