Reputation: 5234
I was reading a article that saw rules rollback, commit and begin.
I don't know these rules what is used?
are there a friend that describe me?
Upvotes: 0
Views: 475
Reputation: 69270
begin
, commit
and rollback
controls a transaction. Everything done within a transaction is either saved together (through commit
) or not saved at all (if doing rollback
).
This can be used if several updates are done which should only get effect if all are successful. If you wrap them in a transaction you can then commit all the changes if they are successful, or rollback all of them if any step along the way fails.
More details can be found in Transactions in MySQL.
Upvotes: 2