Re: Changing the value of a primary key
Posted in 1997
In article <3413ECF3.6390@bluvo.de>, A_Peykan-Sepahi@bluvo.de wrote: > > Hello, > > Is there a simple way to change a primary key of a table without > creating a new record, updating the foreign key columns and then > deleting the old record? > Does Informix provide a standard procedure to handle this kind of > problems? > > Database: Informix Online 7.2x > > Thanks! I don't remember anything in informix to do with "cascading updates" although there is such a thing as cascading deletes. To make things a little bit simpler, look into "set constraints deferred". This will cause the constraints to be checked only at the end of the transaction so you can simply update the primary key and then the referencing data. You could let an update trigger take care of the referencing data to simplify the application logic. Best wishes, ---------------------------------------------------------------------- John H. Frantz Power-4gl: Extending Informix-4gl frantz@centrum.is http://www.rl.is/~john/pow4gl.html -------------------==== Posted via Deja News ====----------------------- http://www.dejanews.com/ Search, Read, Post to Usenet