Trigger if updating

Rated 3.83/5 based on 530 customer reviews

Hence explicitly specifying FOR EACH ROW is optional.

The value of NEW.rowid is undefined in a BEFORE INSERT trigger in which the rowid is not explicitly set to an integer.Note how the values assigned to the view are made available as field in the special "NEW" table within the trigger body.If a BEFORE UPDATE or BEFORE DELETE trigger modifies or deletes a row that was to have been updated or deleted, then the result of the subsequent update or delete operation is undefined.The following restrictions apply: Triggers may be created on views, as well as ordinary tables, by specifying INSTEAD OF in the CREATE TRIGGER statement.If one or more ON INSERT, ON DELETE or ON UPDATE triggers are defined on a view, then it is not an error to execute an INSERT, DELETE or UPDATE statement on the view, respectively.

Leave a Reply