Read about rollback to savepoint after commit, The latest news, videos, and discussion topics about rollback to savepoint after commit from alibabacloud.com
What is savepoint?
Use
The SAVEPOINT statement to identify a point in a transaction to which you can
Later roll back.
For example:
SQL> SELECT * FROM SCOTT. DEPT;
DEPTNODNAME LOC---------------------------------10ACCOUNTING NEW YORK20 RESEARCH
Start transaction, commit and rollback syntaxStart Transaction | Begin [Work]commit [Work] [and [No] chain] [[No] release]rollback [work] [and [No] chain] [[No] release]set autocommit = { 0 | The 1}start transaction or BEGIN statement can begin a
The new JDBC3.0 save Point Interface provides additional transaction control. Most modern DBMS in their environment, such as Oracle's Pl/sql, support SavePoint.
Defines a logical rollback point in a transaction when a save point is set. If an error
BEGIN TRANSACTIONMarks the starting point for an explicit local transaction. BEGIN TRANSACTION The @ @TRANCOUNT by 1 increments.BEGIN TRANSACTION represents a point where data referenced by a connection is logically and physically consistent at that
Before looking at this article, make sure that you understand the concept of Oracle transactions and locks as it is, but do not understand, refer to the consistency and atomicity of database transactions and Oracle TM and TX Locks1. Commit a
The JDBC API provides the Setautocommit () method through which we can disable autocommit database connections. Autocommit should be disabled because only such transactions are not automatically committed unless the connection's commit () method is
Here I will only briefly introduce these two commands, but they are used in the process of use. So I will mention them here. If you are interested in this, you can search for more introductions. Please share them ~~
A Database Transaction starts
Oracle transaction row-Level Lock storage point rollback commit. Note that A and B are not two ORACLE accounts, but two connection sessions. The above is just
Oracle transaction row-Level Lock storage point rollback commit. Note that A and B are not
Mysql commit, rollback, and savapoint attack path-
Generally
After installing mysql
Set autocommit = true;
The SQL statement cannot be rolled back every time it is executed.
Now we want to test commit
We can
Use test;
(Use the test
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.