Re: number of columns in a table?

From: David Bratton <sapsadeb_at_UHSFIN.UHSA.UH.EDU>
Date: 1996/08/16
Message-ID: <4v0dvb$hg8_at_Masala.CC.UH.EDU>#1/1


In article <3210E4A8.41C6_at_curagen.com>, Charlene Liang <cliang_at_curagen.com> writes:
>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.

They're defined in table USER_TAB_COLUMNS.

     SELECT COUNT(*) INTO xxx FROM USER_TAB_COLUMNS
     WHERE TABLE_NAME='foo';


--
David Bratton
University of Houston System
DBratton_at_uh.edu
Received on Fri Aug 16 1996 - 00:00:00 CEST

Original text of this message