Re: How to change a foreign key value ???

From: Michel Lalonde <michel.lalonde_at_sit.ulaval.ca>
Date: 1995/08/03
Message-ID: <michel.lalonde.40.000928C4_at_sit.ulaval.ca>#1/1


In article <DCLJ66.Ens_at_mecati.mecasoft.ch> unter_at_mecati.mecasoft.ch (Stefano UNTERNAEHRER) writes:
>From: unter_at_mecati.mecasoft.ch (Stefano UNTERNAEHRER)
>Subject: How to change a foreign key value ???
>Date: Mon, 31 Jul 1995 19:51:41 GMT

...

>When not, have I really to permit the end user to:
>1- disable all the constraints having this table.column as fk
> (alter table model disable constraint model_prod_fk);
>2- update the column's value in all the tables
>3- enable all the constraints
> (alter table model enable constraint model_prod_fk);
>4- praying all will work fine during this time
>5- crying when not ? :-)))
>Note that to permit this sequence, the end user must be granted to
>a role having the 'alter any table' privilege :-(((
 

>Hope to read a better way to do that ...
>Thank you,
>Stefano

You can create a new product record and then change the product number in the child records. So you will not have to grant anything special to the user.

Michel Lalonde. Received on Thu Aug 03 1995 - 00:00:00 CEST

Original text of this message