Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Rollback the Current Transaction
How To Rollback the Current Transaction? - Oracle DBA FAQ - Understanding SQL Transaction Management
✍: FYIcenter.com
If you have used some DML statements updated some data objects, you find a problem with those updates, and you don't want those updates to be permanently recorded in the database, you can use the ROLLBACK statement. It will remove all the database changes made in the current transaction and end the current transaction. The following tutorial exercise shows you how to use ROLLBACK statements:
SQL> connect HR/fyicenter SQL> INSERT INTO fyi_links (url, id) 2 VALUES ('google.com', 102); SQL> INSERT INTO fyi_links (url, id) 3 VALUES ('myspace.com', 103); SQL> SELECT * FROM fyi_links; ID URL NOTES COUNTS CREATED ------- ---------------- ---------- ---------- --------- 101 fyicenter.com 07-MAY-06 110 centerfyi.com 07-MAY-06 102 google.com 07-MAY-06 103 myspace.com 07-MAY-06 SQL> ROLLBACK; Rollback complete. SQL> SELECT * FROM fyi_links; ID URL NOTES COUNTS CREATED ------- ---------------- ---------- ---------- --------- 101 fyicenter.com 07-MAY-06 110 centerfyi.com 07-MAY-06
As you can see, the two new records inserted into the table were removed by the ROLLBACK statement.
2007-04-18, 4702👍, 0💬
Popular Posts:
What are shared (VB.NET)/Static(C#) variables? Static/Shared classes are used when a class provides ...
What is thread? A thread is an independent path of execution in a system.
How To Write a Minimum Atom 1.0 Feed File? - RSS FAQs - Atom Feed Introduction and File Generation I...
How To Retrieve the Count of Updated Rows? - Oracle DBA FAQ - Working with Database Objects in PL/SQ...
How Is the Width a Parent Element Related to Child Elements? - CSS Tutorials - Understanding Multipl...