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: Get the primary key name of a table

Re: Get the primary key name of a table

From: GreyBeard <Fuzzy.GreyBeard_at_gmail.com>
Date: Wed, 16 Mar 2005 16:20:15 GMT
Message-ID: <pan.2005.03.16.17.21.25.17624@gmail.com>


On Wed, 16 Mar 2005 16:09:52 +0000, Robert Wehofer wrote:

> Hello there!
>
> Which SELECT statement do I need to execute to get the primary key name of a
> certain table?
>
> Robert

Go to the doc at http://docs.oracle.com or http://tahiti.oracle.com, dive into the version you need - these things can change based on version (although this one doesn't) - and pull up the REFERENCE manual. Take a gander at the ???_CONSTRAINTS and ???_CONS_COLUMNS views (??? is one of USER, ALL, or DBA depending on you privs).

I'll let you figger the actual SELECT based on this. Received on Wed Mar 16 2005 - 10:20:15 CST

Original text of this message

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