首页 > 其他分享 >CREATE TRIGGER时NEW和OLD是关键字

CREATE TRIGGER时NEW和OLD是关键字

时间:2023-01-14 09:33:05浏览次数:57  
标签:OLD name column CREATE TRIGGER references NEW

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

标签:OLD,name,column,CREATE,TRIGGER,references,NEW
From: https://www.cnblogs.com/funwithwords/p/17051275.html

相关文章