DB2数据库在使用命令行界面时,执行sql语句,默认情况下是没有事务控制的,每条语句执行完后自动提交。要实现事务控制可以通过修改控制参数实现:
关闭自动提交:update command options using c off
打开自动提交:update command options using c on
![](https://i-blog.csdnimg.cn/blog_migrate/6810355c2f78c12e91b7997a8e8c583a.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/6810355c2f78c12e91b7997a8e8c583a.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/6810355c2f78c12e91b7997a8e8c583a.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/6810355c2f78c12e91b7997a8e8c583a.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/6810355c2f78c12e91b7997a8e8c583a.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/6810355c2f78c12e91b7997a8e8c583a.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/6810355c2f78c12e91b7997a8e8c583a.gif)
DB2数据库在使用命令行界面时,执行sql语句,默认情况下是没有事务控制的,每条语句执行完后自动提交。要实现事务控制可以通过修改控制参数实现:
关闭自动提交:update command options using c off
打开自动提交:update command options using c on