Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to get the index name of the primary key ?
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