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, 4988👍, 0💬
Popular Posts:
How can you enable automatic paging in DataGrid ? Following are the points to be done in order to en...
What are shared (VB.NET)/Static(C#) variables? Static/Shared classes are used when a class provides ...
How Large Can a Single Cookie Be? - PHP Script Tips - Understanding and Managing Cookies How large c...
.NET INTERVIEW QUESTIONS - Can we use events with threading ? Yes, you can use events with thread; t...
How to measure functional software requirement specification (SRS) documents? Well, we need to defin...