I understand how a transaction might be useful for co-ordinating a pair of updates. What I don\'t understand is wrapping single statements in transactions, which is 90% of
One possible excuse is that that single statement could cause a bunch of other SQL to run via triggers, and that they're protecting against something going bad in there, although I'd expect any DBMS to have the common sense to use implicit transactions in the same way already.
The other thing I can think of is that some APIs allow you to disable autocommit, and the code's written just in case someone does that.