Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Enquiring PK Columns

Re: Enquiring PK Columns

From: HansF <News.Hans_at_telus.net>
Date: Fri, 14 Jan 2005 15:22:29 GMT
Message-Id: <pan.2005.01.14.15.21.18.465928@telus.net>


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

Original text of this message

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