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: Jonathan Gennick <gennick_at_worldnet.att.net>
Date: 29 Nov 1998 19:12:27 GMT
Message-ID: <3668edbc.12961613@netnews.worldnet.att.net>


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

>1.) if a table has a primary key defined and
>2.) if so, what's the index name of the primary key

The index name and the primary key name usually match. However, the following query should give you a list of indexes for a table:

	select index_name from user_indexes
	where table_name = 'XXXXXX';

You can get at the index columns by looking at the user_ind_columns view, or is it user_index_cols? I always get that mixed up.

regards,

Jonathan Received on Sun Nov 29 1998 - 13:12:27 CST

Original text of this message

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