## An example of a PL/SQL "discrete transaction"

   BEGIN
     dbms_transaction.begin_discrete_transaction;
     Update Emp
     Set    No_Of_Children = nvl(No_Of_Children,0) + 1
     Where  emp_no = :emp_no;
   EXCEPTION
     when dbms_transaction.discrete_transaction_failed then
          rollback;
          Update Emp
          Set    No_Of_Children = nvl(No_Of_Children,0) + 1
          Where  emp_no = :emp_no;
   END;
