| |

VerySource

 Forgot password?
 Register
Search
Author: caboom04

I don't understand the basic concepts, the more I see, the more I understand

[Copy link]

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-5-2 16:00:01
| Show all posts
if @@ error> 0
rollback
else
commit
Reply

Use magic Report

0

Threads

20

Posts

19.00

Credits

Newbie

Rank: 1

Credits
19.00

 China

Post time: 2020-5-4 11:00:01
| Show all posts
Still not clear
begin transaction
.......................
rollback

All successful, all cancelled; some successful, all cancelled

Since they are all cancelled, why do you need this keyword?

========================
This is just a theoretical example
Actually this is not the case
Generally, it is necessary to add a judgment
if ...
rollback
else
commit
This judgment is not necessarily an error judgment, it may be another judgment
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list