Created
October 10, 2021 14:29
-
-
Save MartinThoma/949a7c13dff9e74165a1cb3f6dca3a26 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
start transaction isolation level read committed; | |
SELECT * FROM balances ORDER BY id; | |
id | balance | |
-------+--------- | |
Alice | 500 | |
Bob | 500 | |
(2 rows) | |
UPDATE balances SET balance = 100 WHERE id = 'Bob'; | |
UPDATE balances SET balance = balance - 50 WHERE id = 'Bob'; | |
END; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment