Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Enquiring PK Columns
On Fri, 14 Jan 2005 21:37:05 +0800, tncc wrote:
> How can we know which columns of a table is part of the primary key ? The
> all_constraints view doesnt provide such an info - it just tell whether a
> table has a pk constraint or not (by the existence of constraint_type='p').
>
> Thx for any advice.
The ALL_CONSTRAINTS view is only one of many views to help you. You might want to become familiar with the Oracle Reference Manual to identify the remaining views, as well as the initialization parameters and a host of other goodies.
Note: it's not the same as the SQL Reference which you should already be reading.
What you want is in ALL_CONS_COLUMNS
/Hans Received on Fri Jan 14 2005 - 09:22:29 CST
![]() |
![]() |