Oracle

Get Column Name and Data Type from Oracle with SQL

Just a short tip on how to retrieve the Column Name and the related Data Type with SQL. Simply issue the following SQL within Oracle:

select column_name, data_type
from all_tab_columns
where table_name = ‘YOURTABLENAME’

This will return you a output with the column name and the data type for it. Remember that Oracle is case sensitive and the table names are all in uppercase in your where select for the table!

Share and Enjoy:
  • Facebook
  • Digg
  • TwitThis
  • Sphinn
  • del.icio.us
  • Mixx
  • Google
  • MisterWong
  • StumbleUpon

If you enjoyed this post, make sure you subscribe to the RSS feed!

Add Your Comment

speak up

Add your comment below, or trackback from your own site.

Subscribe to these comments.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*Required Fields

nitai@sixsigns.com