create or replace procedure synca (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 a set a = bb;
  end if;
  commit;
end synca;
