控制结构语句没有?那我怎么写触发器!
------解决方案--------------------------------------------------------
没办法,SQLITE本身功能的限制。毕竟是免费开发的,并且是基于文件的。
------解决方案--------------------------------------------------------
sql-statement ::= CREATE [TEMP | TEMPORARY ] TRIGGER trigger-name [ BEFORE | AFTER ]
database-event ON [database-name . ] table-name
trigger-action
sql-statement ::= CREATE [TEMP | TEMPORARY ] TRIGGER trigger-name INSTEAD OF
database-event ON [database-name . ] view-name
trigger-action
database-event ::= DELETE |
INSERT |
UPDATE |
UPDATE OF column-list
trigger-action ::= [ FOR EACH ROW | FOR EACH STATEMENT ] [ WHEN expression ]
BEGIN
trigger-step ; [ trigger-step ; ]*
END
在WHEN中写条件试试
------解决方案--------------------------------------------------------
呵呵,没办法,SQLITE不支持IF-THEN-ELSE