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 ;
它工作正常在我的背景。