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: How to get the index name of the primary key ?

Re: How to get the index name of the primary key ?

From: James Petts <jpetts_at_celltech.co.uk>
Date: Fri, 27 Nov 1998 14:49:40 GMT
Message-ID: <365ebad2.369878026@firewall.celltech>


On Fri, 27 Nov 1998 14:25:27 +0100, "Bernhard Mandl" <b.mandl_at_ping.at> wrote:

>Hello,
>
>I guess it must be in one of the system tables
>
>1.) if a table has a primary key defined and
>2.) if so, what's the index name of the primary key
>
>Does anyone know how to query this info ?

Try

SELECT table_name, constraint_name
  FROM user_constraints
 WHERE table_name = 'YOUR_TABLE_NAME'
   AND constraint_type = 'P'; Received on Fri Nov 27 1998 - 08:49:40 CST

Original text of this message

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