Inserted, updated or deleted by the statement causing the trigger to fire.īoth the WHEN clause and the trigger actions may access elements of May be executed (depending on the WHEN clause) for each database row being Hence explicitly specifying FOR EACH ROW is optional.įOR EACH ROW implies that the SQL statements specified in the trigger Many years after SQLite was widely deployed, we have resistedįixing the problem for fear of breaking legacy applications.Īt this time SQLite supports only FOR EACH ROW triggers, not FOR EACH Statement if any of the names in the "UPDATE OF" clause are notĬolumns in the table. It would be more helpful if SQLite would fail the CREATE TRIGGER Unrecognized column names are silently ignored. One of the terms in the SET clause of the UPDATE statement.ĭue to an historical oversight, columns named in the "UPDATE OF"Ĭlause do not actually have to exist in the table being updated. Syntax is used, then the trigger will only fire ifĬolumn-name appears on the left-hand side of The trigger fires once for each row that is deleted, inserted, The following operations: DELETE, INSERT, UPDATE. That are automatically performed when a specified database eventĮach trigger must specify that it will fire for one of The CREATE TRIGGER statement is used to add triggers to theĭatabase schema. table-name AS table-alias INDEXED BY index-name NOT INDEXED table-function-name ( expr ), AS table-alias ( select-stmt ) ( table-or-subquery ), join-clause 2.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |