Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Foreign keys.

Re: Foreign keys.

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Tue, 10 Oct 2000 21:15:27 +0200
Message-ID: <971214678.2789.3.pluto.d4ee154e@news.demon.nl>

select r.table_name, r.constraint_name
from user_constraints c, user_constraints r

where c.table_name = '<your table>'
and   c.constraint_type='P'
and   r.referenced_name=c.constraint_name
and   r.referenced_owner=c.owner

Hth,

Sybrand Bakker, Oracle DBA

<vdolt_at_my-deja.com> wrote in message news:8rvob0$i50$1_at_nnrp1.deja.com...
> I am trying to delete a record from the table. Other tables have
> foreign keys on that table, which prevents me from deleting original
> record. Is there a query I can run to uncover all the foreign key on
> that table?
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Tue Oct 10 2000 - 14:15:27 CDT

Original text of this message

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