![]() If you commit after the second succeeds, then the money gets transferred right.Īnd if there’s a failure at the ATM or in the network, you simply roll back theĭatabase work typically involves a bunch of individual statements grouped into If you autocommit after the first and then the second one fails, the money ![]() ![]() Second SQL statement: deliver $100 to the user at the ATM Should be done when it logically makes sense, not after every statement.įirst SQL statement: withdraw $100 from my account (something like "insert intoįinancial_trans (account, transaction_amount) values (myAccountNumber,-100) What Jeff and Rich are saying, I think, is that committing after every statementĬommits should be done based on the real transactions you’re working with.
0 Comments
Leave a Reply. |