db2中无法识别保存点
我有以下疑问-db2中无法识别保存点,db2,savepoints,Db2,Savepoints,我有以下疑问- SAVEPOINT A ON ROLLBACK RETAIN CURSORS; select max(id) from testdb.table1; ROLLBACK TO SAVEPOINT A; commit 我得到以下错误 ROLLBACK TO SAVEPOINT A DB21034E The command was processed as an SQL statement because it was not a valid Command Line Pr
SAVEPOINT A ON ROLLBACK RETAIN CURSORS;
select max(id) from testdb.table1;
ROLLBACK TO SAVEPOINT A;
commit
我得到以下错误
ROLLBACK TO SAVEPOINT A
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0880N SAVEPOINT "A" does not exist or is invalid in this context.
SQLSTATE=3B001
我是DB2新手,我没有得到任何start事务类型语句,但是存在commit
如何解决此错误
分辨率
我有以下几点-
update command options using c OFF;
SAVEPOINT A ON ROLLBACK RETAIN CURSORS;
select max(id) from testdb.table1;
ROLLBACK TO SAVEPOINT A;
commit;
update command options using c ON ;
update command options using c OFF;
SAVEPOINT A ON ROLLBACK RETAIN CURSORS;
select max(id) from testdb.table1;
ROLLBACK TO SAVEPOINT A;
commit;
update command options using c ON ;
在我的背景下,它运行良好