Oracle Data Dictionary

Here is the query to get oracle data dictionary. No information of pk, fks.

This information is useful during database design phase.

select a.table_name, a.column_id, a.column_name, a.data_type, a.data_length,a.data_precision, a.data_scale, a.nullable, a.data_default, b.comments
from USER_TAB_COLUMNS a, user_col_comments b
where a.TABLE_NAME like ‘%TABLE_NAME%’ and a.table_name = b.table_name and a.column_name = b.column_name
order by a.table_name, a.column_id

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s