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: Yann CAUCHARD <yann.cauchard_at_spcconsultants.com>
Date: Mon, 10 Sep 2001 14:21:33 +0200
Message-ID: <9nib9j$qka$1@news6.isdnet.net>


Try this :

select rpad(c.column_name,50)||' is primary key of '||c.table_name as "Primary keys"
 from user_cons_columns c, USER_CONSTRAINTS u  where c.CONSTRAINT_NAME=u.CONSTRAINT_NAME  and u.CONSTRAINT_TYPE='P'and c.table_name='YOUR TABLE NAME'

Yann

GengBo a écrit dans le message <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
>
>
>
Received on Mon Sep 10 2001 - 07:21:33 CDT

Original text of this message

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