CREATE TRIGGER时NEW和OLD是关键字

SQLite 触发器 - 菜鸟教程 (runoob.com)

CREATE TRIGGER - sqlite.org

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
posted @ 2023-01-14 09:23  Fun_with_Words  阅读(15)  评论(0编辑  收藏  举报









 张牌。