是不是可以这样 :
bgein;
select id from 表1 where id=1 for update;
select id from 表2 where id=1 for update;
select id from 表3 where id=1 for update;
update ok=1 set 表1 where id=1;
update ok=1 set 表2 where id=1;
update ok=1 set 表3 where id=1;
commit ;
是的可以,虽然 update 语句写错了(意思到了)
在此期间,其他的连接是不能 update 这几个表的
是的可以,虽然 update 语句写错了(意思到了)
在此期间,其他的连接是不能 update 这几个表的
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号