1
0
Files
sql-study/MySQL/transaction-error/user_b.sql
2025-11-04 21:35:51 +08:00

20 lines
388 B
SQL

-- example 1
-- ========== 1 =========
start transaction;
-- B插入数据
insert into customer (id, username)
values (1, 'Fortern'),
(2, 'Maxin'),
(3, 'MooGeo');
commit;
-- ========== 2 =========
-- example 2
-- ========== 1 =========
start transaction;
-- B 修改所有人的name
update customer set username = '哈基米' where true;
commit;
-- ========== 2 =========