Topic: How to find data field datatype and length?


rajas    -- 08-29-2006 @ 10:17 PM
  I have a simple question related to oracle 9.

By a simple query, how to find the column name, data type and its length for a particular field from coldfusion.

For eg, I have a table "temp" and it's having 3 fields
like
Name  varchar2(50)
Desi    varchar2(25)
Age    number(3,0)

From coldfusion I want to know what is the data type and length of "Desi". Just one field alone by specifying the name of the field from the query, not all.
How this can be done. Thanx.


dduck1934    -- 09-15-2006 @ 11:48 AM
  I know its been a few days since your post.  If you want to find info about a table, you can use a query to do it.

Select table_name, column_name,data_type,data_length
from all_tab_columns
where table_name = 'TEMP'

if you want a particular column, just put

and column_name = 'DESI'

that should get the info you are asking about. Let me know if you need any additional help.

-dduck

I feel my luck could change...Its gonna be a glorious day.

This message was edited by dduck1934 on 11-25-06 @ 10:52 PM


EasyCFM.COM ColdFusion Forums : http://archive.easycfm.com/forums
Topic: http://archive.easycfm.com/forums/viewmessages.cfm?Forum=33&Topic=9936