Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Table key fields

Re: Table key fields

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Sun, 13 Mar 2005 23:25:21 +0100
Message-ID: <2af931tiohq9fhbe9g8h9qmkkbffphagem@4ax.com>


On Sun, 13 Mar 2005 20:15:23 +0100, "Nicolas Prömper" <Nicolas.Proemper_at_btconsult.de> wrote:

>Hi all!
>
>I want to determine the key fields of a table through reading the oracle
>meta data tables. Obviously, ALL_TAB_COLUMNS does not contain a key flag and
>reading the indexes seems not be the right solution.
>So, does anyone knows, where the "key-flag" is stored?
>
>Thanks a lot
>Nick
>
>P.S: The version I'm currently reading is a 9.1.
>

There is no such thing as a key flag. The datamodel of the dictionary is normalized.

There is dba|all|user_indexes and dba|all|user_ind_columns and
there is dba|all|user_constraints and dba|all|user_ind_constraints

and of course there is the dict view explaining what entities are in the dictionary, and the dict_columns view to explain what the various attributes mean.

--
Sybrand Bakker, Senior Oracle DBA
Received on Sun Mar 13 2005 - 16:25:21 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US