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

Home -> Community -> Usenet -> c.d.o.server -> Re: Which cols are part of the primary key?

Re: Which cols are part of the primary key?

From: Volker Hetzer <volker.hetzer_at_ieee.org>
Date: Wed, 22 Mar 2006 17:58:37 +0100
Message-ID: <dvrvnu$677$1@nntp.fujitsu-siemens.com>


Alien schrieb:
> Hi,
>
> 1 select a.owner,a.constraint_name,a.table_name,a.column_name
> 2 from user_cons_columns a, user_constraints b
> 3 where a.constraint_name=b.constraint_name
> 4* and b.constraint_type='P'
> SQL> /
>
> OWNER CONSTRAINT_NAME TABLE_NAME
> COLUMN_NAME
> ---------- -------------------- ------------------------------
> ---------------
> SCOTT PK_DEPT DEPT DEPTNO
> SCOTT PK_EMP EMP EMPNO
>
> SQL>

Will do.
Thanks a lot! :-)
Volker Received on Wed Mar 22 2006 - 10:58:37 CST

Original text of this message

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