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?
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_nameorder by di.column_position;
Regards,
Rob
Received on Mon Mar 20 2006 - 08:49:38 CST