Search code examples
oracleoracle-apexsavepoints

How to Create Rollback & Savepoints on Oracle apex?


Is there any way to Create a save-point and to Rollback on Oracle apex application I have tried several times on Application but several error occurs


Solution

  • Code should be complete; you can't have only begin and savepoint. Something like this:

    begin
      savepoint a;
      delete from test;
      rollback to a;
    end;
    /
    

    Your code, fixed (you must terminate every statement with a semi-colon ;):

    begin   
      savepoint a;
      UPDATE emp SET salary = 70000 WHERE ename = 'HUzaifa';
      rollback to a;
    end; 
    /