Created
October 12, 2025 20:35
-
-
Save shivamka1/2aae835186d4eac9ea05118217717016 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| BEGIN; | |
| SELECT balance FROM accounts WHERE user_id = 1; | |
| -- client logic checks balance > 0 | |
| UPDATE accounts SET balance = balance - 100 WHERE user_id = 1; | |
| COMMIT; |
Comments are disabled for this gist.