Oracle rollback | rollback - oracle tutorial - sql tutorial



What is Oracle Rollback ?

  • Rollback is the inverse of Commit Statement.
  • This statement is used to undo the work performed by the current transaction or a transaction that is in doubt.
  • Rollback restore the state of the database to the last commit point.
 rollback

Syntax:

ROLLBACK;
click below button to copy the code. By - oracle tutorial - team

Example:

 oracle rollback after commit
  1. Delete From the “wikitechy table”.
  2. ROLLBACK is the keyword.
  3. SELECT from the wikitechy table.
  4. The Output has been processed according to rollup statement.

Difference between ROLLBACK

  • As both ROLLBACK and COMMIT Commands are TCC (Transaction Control Commands), but are not similar to eachother. Here is the difference:
ROLLBACK COMMIT
To undo the work/changes
that are committed
or done by COMMIT clause
we use the ROLLBACK Command.
It is reverse of COMMIT.

It rollbacks all the changes
of the current transactions.

In other words ROLLBACK restore
the state of the database
to the last commit point.
Whatever changes we have made/ done
in our transaction cannot be fixed until we commit that transaction
and this can be possible by using COMMIT statement.

In other words it will make our changes permanent
that cannot be rolled back.
Syntax
ROLLBACK;
Syntax
COMMIT;
oracle tutorial , sql tutorial , sql , pl sql tutorial , oracle , pl sql , plsql

Syntax: when both are used at the same time:

BEGIN [WORK]
COMMIT [WORK] [AND [NO] CHAIN] [[NO] RELEASE]
ROLLBACK [WORK] [AND [NO] CHAIN] [[NO] RELEASE]
click below button to copy the code. By - oracle tutorial - team

This tutorial provides an indepth knowledge on the following items such as oracle tutorial , sql tutorial , sql , pl sql tutorial , oracle , pl sql , mysql tutorial , sql tutorial for beginners , learn sql , oracle database tutorial , sql query tutorial , oracle dba tutorial , plsql tutorial , oracle tutorial pdf , oracle pl sql tutorial , oracle sql tutorial , sql tutorial point , oracle tutorial for beginners , learn oracle online free , learn oracle online , learning pl sql programming , learn sql online for free , sql learning online , dba oracle tutorial , oracle sql tutorial advanced , oracle 11g dba tutorial with examples , oracle online learning , oracle learning online , how to learn pl sql , sql coding tutorial , sql learning websites , sql basic learning

Related Searches to Rollback