In any case, you can use a trigger to update table that has no primary key from that trigger update one or few records from the same table. the code bellow does that:. Create trigger foo_trigger_01 on dbo.foo for insert, update , delete as set nocount on set xact_abort on set ansi_nulls on set concat_null_yields_null on -- -- create the temp table. this temp table will be in scope for any stored -- procedure executed by this trigger.. So, it would see your "model is a mess" if you feel the need to update a primary key (and have it cascade). if you want this to be "automatic", you won't update the primary key. there are methods via triggers, but i'm very very very much against that - not going to go there anymore..
It is possible to create an "on insert" trigger and work with the inserted row by selecting (select * from inserted) now i'd need an "on update" trigger. i want to check a specific value of the old row and the updated row and compare them.. Hi, one way is to disable all the dependent constraints , update the table and enable the constraints again. but updating a primary key column is not recommended by oracle and it is not good practice. a primary key column should be used to identify records uniquely only and it should not be modified.. The class works by passing to the function 'update_datasets_return' a dataset with as many tables as you want. the function spins through the tables and put the keys in each row inserted. it's assumed the first row will either be the primary key or some numeric value..