Re: Return data type of a column by a function?

From: Dave Waterworth <pscdaw_at_ihug.com.au>
Date: Sat, 26 Jun 1999 23:06:53 +1000
Message-ID: <7l2j65$9el$1_at_toto.tig.com.au>


The ALL_TAB_COLUMNS and USER_TAB_COLUMNS views contain the data you're looking for.

SELECT DATA_TYPE, DATA_LENGTH, DATA_PRECISION, DATA_SCALE FROM ALL_TAB_COLUMNS WHERE TABLE_NAME = 'YOUR_TABLE'; If you really need a function then you could embed the above in a PL/SQL function

Cheers

Dave Waterworth

Jimmy wrote in message <377508F7.CDB1557D_at_comp.polyu.edu.hk>...
>Hello all,
> Could anyone tell me is there a function provided to return the data
>type of a column (and the length of a column) in Oracle 7.3.3 (or
>above)?
>
>Thanks,
>Jimmy
>
Received on Sat Jun 26 1999 - 15:06:53 CEST

Original text of this message