52ky 发表于 2022-10-19 16:40:36

Jdbc事务控制管理.ppt

业务的概念业务指逻辑上的一组操作,构成这组操作的各个单元,要不全面成功,要不全面不成功。例如:A——B转帐,对应于如下两条sql语句updateaccountsetmoney=money-100wherename=‘a’;updateaccountsetmoney=money+100wherename=‘b’;数据库默认业务是自动提交的,也即是发一条sql它就履行一条。如果想多条sql放在一个业务中履行,则需要使用如下语句。数据库打开业务命令starttransaction打开业务Rollback回滚业务Commit提交业务

(The concept of business A business refers to a logical group of operations. The various units that make up this group of operations are either fully successful or fully unsuccessful. For example, A-B transfer corresponds to the following two SQL statements: updateaccountsetmoney=money-100where name='a'; updateaccountsetmoney=money 100wherename=‘b’; The default business of the database is automatically submitted, that is, it will perform one SQL statement. If you want to perform multiple SQL statements in one business, you need to use the following statements. Database open business command starttransaction open business Rollback rollback business Commit submit business)




页: [1]
查看完整版本: Jdbc事务控制管理.ppt