|
begin transaction
.............
commit
begin transaction
.............
rollback
The same is transaction processing, I can't figure it out now.For example, I have N insert or update statements. I think if any one is not successful or interrupted for any reason, all insert or update operations will be canceled. In the case, whether to use commit or rollback, can you elaborate?
My question is that the book says that “commit” means that all the statements have been executed successfully, then commit; then what is the result?
Rollback is still the same problem. It is required to use rollback in the statement to roll back the error, but the final execution result is partially wrong. |
|