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:
>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
![]() |
![]() |