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

Home -> Community -> Usenet -> c.d.o.misc -> Re: HELP:The columns of primary key?

Re: HELP:The columns of primary key?

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Mon, 10 Sep 2001 05:50:16 +0200
Message-ID: <tpqcvk3qbtnhfb@news.demon.nl>

"GengBo" <bgeng_at_szdhd.sz.lucent.com> wrote in message news:3B9C2981.AEEB8916_at_szdhd.sz.lucent.com...
> Hi, All,
>
> Could expert tell me how to check the columns of primary key? The table is
not
> created by myself , so I don't know how primary key composed.
>
> Thanks,
> Bob
>
>
>

select index_name, column_name
from user_ind_columns i, user_constraints c where c.table_name = '<your table>'
and c.constraint_type = 'P'
and i.index_name = c.constraint_name
order by i.column_position
/

Hth,
Sybrand Bakker, Senior Oracle DBA Received on Sun Sep 09 2001 - 22:50:16 CDT

Original text of this message

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