0
承认我有以下查询 -保存点不DB2
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,我没有得到任何启动的交易类型语句,但犯存在。
如何解决此错误?
分辨率
我得到了以下 -
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 ;
它工作正常在我的背景。