MySql最简单的触发器例子_MySQL
程序员文章站
2022-06-15 18:29:49
...
bitsCN.com
MySql最简单的触发器例子
bitsCN.com
如下:
[sql] DROP TRIGGER IF EXISTS t_afterupdate_on_tab1; CREATE TRIGGER t_afterupdate_on_tab1 AFTER UPDATE ON tab1 FOR EACH ROW BEGIN delete from tab2 where old.status=0 and pid=old.id; END;
bitsCN.com