DB2 10.5 for Linux, UNIX, and Windows

Cursors and system-period temporal tables

Cursors used to update or delete rows for a query that potentially references rows in a history table must be read-only.

In the following example, the statement runs successfully because the cursor appcur is read-only.
DECLARE appcur CURSOR FOR SELECT * FROM policy_info
   FOR SYSTEM_TIME AS OF '2011-02-28';
However, the following statement results in an error because any cursor references to the history rows are not read-only:
DECLARE appcur CURSOR FOR SELECT * FROM policy_info
   FOR SYSTEM_TIME AS OF '2011-02-28' FOR UPDATE;