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:56 +0100
Message-ID: <dvrvoh$677$2@nntp.fujitsu-siemens.com>


Rob F schrieb:
> Hopefully the following is what you're looking for, it should work with
> 10g as well I believe ;-
> select di.column_name
> from dba_ind_columns di,
> dba_constraints dc
> where dc.owner = <table owner>
> and dc.table_name = <table name>
> and dc.constraint_type = 'P'
> and di.owner = dc.owner
> and di.table_name = dc.table_name
> and di.index_name = dc.constraint_name
> order by di.column_position;

Thanks too!
Volker Received on Wed Mar 22 2006 - 10:58:56 CST

Original text of this message

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