CREATE DATABASE bank;
USE bank;
CREATE TABLE accounts (
id integer PRIMARY KEY AUTO_INCREMENT,
`name` VARCHAR(255),
balance DECIMAL(10,2)
);
INSERT INTO accounts (`name`, balance)
VALUES
('Sam', 100),
('Patrick', 100);
start transaction;
select * from accounts;
That should show 2 accounts
insert into accounts (name, balance)
values ("Jeremy", 100);
update accounts set balance = 0;
select * from accounts;
That should still show 2 accounts, but now there's three, even though it's inside of a repeatable read transaction.