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

Home -> Community -> Usenet -> c.d.o.server -> Re: finding a table's primary key

Re: finding a table's primary key

From: <mark.powell_at_eds.com>
Date: Tue, 02 Mar 1999 14:02:59 GMT
Message-ID: <7bgr2d$p07$1@nnrp1.dejanews.com>


In article <7bgijs$i1e$1_at_nnrp1.dejanews.com>,   jerwynn_at_buyasia.com wrote:
> Is there an SQL or PL/SQL command to query the primary key of a table?
>
> If not, where (in which tables) can I find information
> about the primary keys of tables?
>
> Thanks.
>
> Jerwynn
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>

The information you want is in sys.dba_constraints (or all_constraints). You will also find related data in sys.dba_indexes and sys.dba_ind_columns.

Mark D. Powell -- The only advice that counts is the advice that  you follow so follow your own advice --

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Tue Mar 02 1999 - 08:02:59 CST

Original text of this message

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