create or replace procedure syncb (n number) is
aa number := 0;
bb number := 0;
begin
  select a into aa from a; /* for update */
  select b into bb from b;
  delay(n);
  if aa <> bb then update b set b = aa;
  end if;
  commit;
end syncb;
/
show err
