SQLite 触发器 - 菜鸟教程 (runoob.com)
Both the WHEN clause and the trigger actions may access elements of the row being inserted, deleted or updated using references of the form "NEW.column-name" and "OLD.column-name", where column-name is the name of a column from the table that the trigger is associated with. OLD and NEW references may only be used in triggers on events for which they are relevant, as follows:
- INSERT NEW references are valid
- UPDATE NEW and OLD references are valid
- DELETE OLD references are valid