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: querying constraints

Re: querying constraints

From: Sybrand Bakker <gooiditweg_at_sybrandb.demon.nl>
Date: Tue, 17 Sep 2002 18:46:55 +0200
Message-ID: <72neougoavckd0c3dadfmadf0ung3k7dau@4ax.com>


On Tue, 17 Sep 2002 09:12:30 -0700, "Torry Slaton" <tslaton_at_tcshealthcare.com> wrote:

>Anybody know how I can query a table and get the primary key fields?
>
>Thanks!
>Torry
>

You need to query the datadictioniary:
user_constraints where table_name = '<your table>' and constraint_type = 'P'
and user_cons_columns to get the column definition

Hth

Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address Received on Tue Sep 17 2002 - 11:46:55 CDT

Original text of this message

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