8. OpenSQL Statements : COMMIT : Example: Commit
 
Share this page                  
Example: Commit
The following embedded example issues two updates, each in its own transaction:
exec sql connect 'mvs1::personnel/db2';
  
exec sql update employee set salary = salary * 1.1
      where rating = 'Good';

exec sql commit;

exec sql update employee set salary = salary * 0.9 
where rating = 'Bad';

exec sql disconnect;
/* Implicit commit issued on disconnect */