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;
时间: 2024-10-17 17:57:06