Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Which cols are part of the primary key?
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