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: Mark D Powell <mark.powell_at_eds.com>
Date: 10 Sep 2001 08:30:47 -0700
Message-ID: <178d2795.0109100730.4b67b1f@posting.google.com>


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
>
> --

This task can be answered by using the rdbms dictionary. Here is a link to a general article on using the dictionary: http://www.jlcomp.demon.co.uk/faq/ind_faq.html#DBA%20and%20general%20server%20technology

The title of the article is: How do I find information about a database object: table, index, constraint, view, etc... in Oracle ? should you have any trouble following the link.

Look at dba_indexes for all indexes on the table, then look at dba_ind_columns to see what columns make up the indexes on the table
The indexes may or may not be part of a declared PK. Look at dba_constraints for this information. The constraint_type = 'P' would be a PK.

Received on Mon Sep 10 2001 - 10:30:47 CDT

Original text of this message

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