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;

posted @ 2015-01-08 08:26  netcorner  阅读(464)  评论(0编辑  收藏  举报