mysql事务块处理
begin ,rollback,commit .当然有的人用begin /begin work .推荐用START TRANSACTION 是SQL-99标准启动一个事务。
start transaction;
update from account set money=money-100 where name='a';
update from account set money=money+100 where name='b';
commit;
begin ,rollback,commit .当然有的人用begin /begin work .推荐用START TRANSACTION 是SQL-99标准启动一个事务。
start transaction;
update from account set money=money-100 where name='a';
update from account set money=money+100 where name='b';
commit;