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: How to find primary keys?

Re: How to find primary keys?

From: Michael Ho <infoage_at_hk.super.net>
Date: 1997/04/08
Message-ID: <33491A0C.51BC@hk.super.net>#1/1

Tim Spellman wrote:
>
> I would like a list of all the primary key columns in all my tables.
> I'm
> thinking of something simple like
>
> select table_name, column_name from cols where <what is the condition?>;

SELECT CONSTRINT_NAME, TABLE_NAME FROM ALL_CONSTRAINTS WHERE CONSTRAINT_TYPE IN ('P','U') Received on Tue Apr 08 1997 - 00:00:00 CDT

Original text of this message

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