======================= Terminal A ==========================
mysql> create table Accounts (acctNo int primary key, balance int);
Query OK, 0 rows affected (0.01 sec)

mysql> insert into Accounts values (456, 200);
Query OK, 1 row affected (0.00 sec)

mysql> insert into Accounts values (123, 500);
Query OK, 1 row affected (0.00 sec)

mysql> select * from Accounts
    -> ;
+--------+---------+
| acctNo | balance |
+--------+---------+
|    123 |     500 |
|    456 |     200 |
+--------+---------+
2 rows in set (0.00 sec)

mysql> update Accounts set balance = balance + 100 where acctNo = 456;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> select * from Accounts;
+--------+---------+
| acctNo | balance |
+--------+---------+
|    123 |     500 |
|    456 |     300 |
+--------+---------+
2 rows in set (0.00 sec)
======================== TERMINAL B =========================
mysql> select * from Accounts;
+--------+---------+
| acctNo | balance |
+--------+---------+
|    123 |     500 |
|    456 |     300 |
+--------+---------+
2 rows in set (0.00 sec)

mysql> start transaction;
Query OK, 0 rows affected (0.00 sec)

mysql> update Accounts set balance = balance + 200 where acctNo = 456;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> select * from Accounts;
+--------+---------+
| acctNo | balance |
+--------+---------+
|    123 |     500 |
|    456 |     500 |
+--------+---------+
2 rows in set (0.00 sec)

======================== TERMINAL A =========================
mysql> select * from Accounts;
+--------+---------+
| acctNo | balance |
+--------+---------+
|    123 |     500 |
|    456 |     300 |
+--------+---------+
2 rows in set (0.00 sec)

======================== TERMINAL B ==========================
mysql> commit;
Query OK, 0 rows affected (0.00 sec)

======================== TERMINAL A ==========================
mysql> select * from Accounts;
+--------+---------+
| acctNo | balance |
+--------+---------+
|    123 |     500 |
|    456 |     500 |
+--------+---------+
2 rows in set (0.00 sec)