mysql_事物

时间:2023-03-09 07:09:49
mysql_事物

1) set autocommit=0  关闭自动提交   插入修改,只有commit 才最终存入

2) start transaction

   commit/rollback

3) show variables like '%commit%'

4) 触发器:

    create  trigger name after/before insert/update/delete on 表名 for each row

      begin

        sql语句

      end;