sql - Query to fetch Structure of a table -
need sql query fetch table structure oracle database.
i need following information output:
- table name
- field name
- field format
- field length
- mandatory field
- primary key
- foreign key
if want column information db management system, have try find system tables one. every db management system has it's own system tables it's storing information tables , other things created users.
all_tab_columns
storing information columns oracle, can information field name
, field format
, field length
, mandatory field
.
if want know keys have make query all_indexes
. please this or this.
your query this
select column_name, .... all_tab_columns column_name="your_table_name"
for getting if column part of index or not have join all_indexes
, all_ind_columns
.
Comments
Post a Comment