Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: HELP:The columns of primary key?
"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