Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: To know tables' columns in a database
>> I would like to write a query which list key columns of my own tables.
>> For each key column, I would like to get a row with
>> - table name of this column
>> - column name
>> - key name ie constraint name
>> - position with the key
>> - a type = 'Primary', 'Secondary' or 'Foreign'
>> - a target table only for foreign keys
>> - a target column
> You really want to look at Oracle's documentation at > http://docs.oracle.com and search for 'TAB_COLUMNS', 'CONS_COLUMNS' and > the other 100 views that support your requirement.
I found interested views to find table name, column name, constraint name, and position within the key. Thanks Hans.
But no views for:
- a type = 'Primary', 'Secondary' or 'Foreign' - a target table only for foreign keys - a target column only for foreign keys
Does anybody know a good better webpage with views on tables (mine was a short views list on oracle website, I tried all views I saw) or keywords to find what I am looking for?
Thanks by advance. Received on Thu Feb 19 2004 - 20:55:00 CST