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: Privilege for creating PK-FK relationship

Re: Privilege for creating PK-FK relationship

From: Richard Foote <richard.foote_at_bigpond.com>
Date: Mon, 29 Jul 2002 10:52:43 +1000
Message-ID: <9e019.46347$Hj3.140934@newsfeeds.bigpond.com>


Hi Paul/Stjepan,

Absolutely correct (I read it incorrectly :( Thanks for the clarification.

Just got too excited watching David Bowie being featured on 60 minutes !!

Regards

Richard
"Paul Brewer" <paul_at_paul.brewers.org.uk> wrote in message news:3d44327a$1_2_at_mk-nntp-1.news.uk.worldonline.com...
> "Richard Foote" <richard.foote_at_bigpond.com> wrote in message
> news:VbJ09.45722$Hj3.138697_at_newsfeeds.bigpond.com...
> > Hi Stjepan,
> >
> > Check out the References object privilege.
> >
> > Cheers
> >
> > Richard
> > "Stjepan Brbot" <stjepan.brbot_at_zg.hinet.hr> wrote in message
> > news:ahvekj$cjcm$2_at_as201.hinet.hr...
> > > I'd like to create PK-FK relationship between two tables from
different
> > > schemas. If parent table is in my own schema and child table in
another
> > > schema, what kind of privileges (minimal) I have to have on this child
> > > table in another schema to create mentioned relationship?
> > >
> > > --
> > >
> > > Stjepan Brbot
> > >
> > >
> > >
> >
> References is indeed pertinent here.
> If the parent table were in the other schema, then to create a FK
constraint
> in my schema, all that would be required is for the owner of the other
> schema to grant references on the parent table to me.

>

> But I'm not sure whether Richard has noted that it's the other way round.
> Whoever actually creates this constraint , the constraint itself will
reside
> in the 'other' schema, as a FK constraint 'belongs' to the table being
> constrained; i.e. the child.
>

> So I think that the correct answer to the question actually being asked is
> ALTER on the child table. But unless there was a good reason, I think that
> as Stjepan, I'd grant references on his parent table to the other account,
> then have the other account create the constraint.
>

> Sorry this was somewhat long-winded.
>

> Paul
>
>
>
Received on Sun Jul 28 2002 - 19:52:43 CDT

Original text of this message

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