HR@prod> commit;
HR@prod> select * from test;
ID MONEY
---------- ----------
1 100000
HR@prod> insert into test values(2,20000);
1 row created.
HR@prod> savepoint before_update;
Savepoint created.
HR@prod> update test set money=12345;
2 rows updated.
HR@prod> select * from test;
ID MONEY
---------- ----------
1 12345
2 12345
HR@prod> rollback to before_update;
Rollback complete.
HR@prod> select * from test;
ID MONEY
---------- ----------
1 100000
2 20000
HR@prod> commit;
转载于:https://blog.51cto.com/plking/1332626