You cannot use INSTEAD OF
triggers on tables, and when RAISE
-ing an error in BEFORE
/AFTER
triggers, any updates done in the trigger would also be rolled back.
You could rename your table, create a view for that table, and create lots of INSTEAD OF
triggers to implement all the INSERT
/UPDATE
/DELETE
operations.
However, it would be much easier to change your program to just execute the UPDATE
when it wants to mark some record.