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: Johannes Wilhelm <x15_at_aixterm8.urz.uni-heidelberg.de>
Date: 2 Mar 1999 12:43:17 GMT
Message-ID: <7bgmd5$kst@sun0.urz.uni-heidelberg.de>


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

Here a litle script to search constraints:

select table_name, constraint_name, constraint_type,

       status, search_condition
   from all_constraints
   where owner=user
   order by table_name
/

constraint_type='P' = primary key

Johannes Received on Tue Mar 02 1999 - 06:43:17 CST

Original text of this message

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