I have a table called user. This table has a foreign key for the department table. One user can be associated with one department. Before deleting a department, I would like to set the default value (1) for any user (having this department identifier) to avoid referential integrity errors.
Do you know a good example. Most examples show that a trigger applies to a single table. Here the trigger should be launched on the department, but change the values in the user table.
Thank.
source
share