Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Enquiring PK Columns
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.
SQL> desc user_cons_columns
Name Null? Type ------------------------- -------- ------------------- OWNER NOT NULL VARCHAR2(30) CONSTRAINT_NAME NOT NULL VARCHAR2(30) TABLE_NAME NOT NULL VARCHAR2(30) COLUMN_NAME VARCHAR2(4000) POSITION NUMBER
Regards
/Rauf
Received on Fri Jan 14 2005 - 08:46:12 CST