Interaction of SELECT FOR UPDATE lock with cursor and batch DML
问题 Currently my code skeleton looks like: varchar rowidvariable[batchlimitcount][19]; stmt = "Select rowid from table_name where xx" delstmt = "delete from table_name where rowid=:rowidvariable" prepare delstatement using delstmt; prepare cursor from stmt; declare cursor from preparecursor; open cursor; while(1) { fetch cursor into rowidvariable; somecondition {break}; exec sql for fetchedCount execute delstatement using :rowidvariable; commit; } It was pointed out to me that locking the table