Está en la página 1de 2

1/7/2014 The Oracle PL/SQL ROLLBACK Statement

http://psoug.org/definition/ROLLBACK.htm 1/2
Compre ahora!

Pantal l a Led
de 46" Smart
3D ms TV
MX$12,990
APPLE IPOD
TOUCH 32GB
BLANCO +
MX$4,790.00
iPod Touch 64
GB Azul
MX$6,390.00
Quick Search:

GO
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
The Oracle PL/SQL ROLLBACK Statement [Return To Index]
0
Jump to: Select a Location
Looking for the original pages? (formerly called "Morgan's Library") You can find them here.
Term: ROLLBACK
Definition:
In Oracle PL/SQL, ROLLBACK is a TCL (Transaction Control Language) command, which is used as
"undo" feature in SQL. If a transaction or set of transactions has been done on a set of table data,
it can be reverted in the same session using the ROLLBACK command.
Example Syntax:
SQL> ROLLBACK;
Example Usage:
The SELECT below statement shows the current data in the TEST table:
SQL> SELECT * FROM TEST;
ID NAME LNAME
---------- -------------------- ----------
1 CLUB ORACLE
2 SCOTT HR
The INSERT statement below inserts a new record into the TEST table, and the SELECT statement confirms the
insertion of the new record:
SQL> INSERT INTO TEST VALUES (3,'PSOUG','ORACLE');
1 row created.
SQL> SELECT * FROM TEST;
ID NAME LNAME
---------- -------------------- ----------
1 CLUB ORACLE
2 SCOTT HR
3 PSOUG ORACLE
The ROLLBACK command is now executed to revert back the last set of transactions done on the table:
SQL> ROLLBACK;
Rollback complete.
SQL> SELECT * FROM TEST;
Better than APEX Mobile
theformspider.com
Create Native Mobile Applications with JUST PL/SQL.
Discover more...
Renault Mxico
renault.com.mx
Ven, Conoce Nuestros
Autos y Haz Tu Prueba
de Manejo y
Convncete Hoy!
Oracle from Delphi
1/7/2014 The Oracle PL/SQL ROLLBACK Statement
http://psoug.org/definition/ROLLBACK.htm 2/2
ID NAME LNAME
---------- -------------------- ----------
1 CLUB ORACLE
2 SCOTT HR
Related Links:
Oracle Transactions: ROLLBACK
Oracle UPDATE: Example using ROLLBACK
Object Views: Example using ROLLBACK
Related Code Snippets:
Show rollback segment stats - Display the current rollback segment statistics.

Home : Code Library : Sponsors : Privacy : Terms of Use : Contact Us 210 users online 2009 psoug.org
Oracle Date Query Oracle PLSQL Oracle Database Oracle SQL 10G

También podría gustarte