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: more problems with listing pks and fks

Re: more problems with listing pks and fks

From: <prochak_at_my-dejanews.com>
Date: 1998/09/16
Message-ID: <6tp3kj$n91$1@nnrp1.dejanews.com>#1/1

In article <6tnimn$ugb$1_at_nnrp1.dejanews.com>,   Thenardier_at_POBoxes.com wrote:
>
>
> hi,
>
> i asked u people about how to list pks and fks of a tables and
> someone told me to select table name from the all_constraints
> where constraint_type is 'P'. i tried it and find it works fine
> if the table's pk contains only one columns. but if the pk is
> a combination of different columns, it returns no row. what
> should i do?
>
> thanx.
>
> rgds,
> thenard

Please show us your query. We are people, not mind readers. The number of columns should not affect this at all. The ALL_CONSTRAINTS table doesn't even have column information.

SELECT OWNER, CONSTRAINT_NAME, TABLE_NAME  FROM ALL_CONSTRAINTS
 WHERE CONSTRAINT_TYPE = 'P' ; Try that.

--
Ed Prochak
Magic Interface, Ltd.
440-498-3702

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum
Received on Wed Sep 16 1998 - 00:00:00 CDT

Original text of this message

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