drop table if exists t1,t2,t3; create table t1 (f1 int unique, f2 text); insert into t1 values (1, 'one'); create table t2 (f1 int unique, f2 text); insert into t2 values (2, 'two'); create table t3 (f1 int unique, f2 text); insert into t3 values (3, 'three'); explain select * from t1 union all select * from t2 union all select * from t3 order by 1; begin; declare c cursor for select * from t1 union all select * from t2 union all select * from t3 order by 1; fetch 1 from c; update t1 set f2 = f2 || ' updated' where current of c; update t2 set f2 = f2 || ' updated' where current of c; update t3 set f2 = f2 || ' updated' where current of c; commit; table t1; table t2; table t3;