EasyCFM.COM ColdFusion Forums / Oracle Related Issues / How to find data field datatype and length?

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: How to find data field datatype and length?

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

rajas
08-29-2006 @ 10:17 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Junior Member
Posts: 144
Joined: Oct 2004

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
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 264
Joined: Sep 2004

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


Website Designed and Developed by Pablo Varando.