#1110

A transfer in one atomic step

A transfer of 50 from account id = 1 to id = 2 in accounts must be atomic: without a single operation the first step goes through, and if the second fails the money is lost. Do the transfer in one atomic statement: debit id = 1 (if it has enough) and credit id = 2 only when the debit succeeded. It must be safe under concurrent transfers.

Ovdje će se pojaviti rezultat tvog upita