📄 dead_lock.txt
字号:
--sqlplus(1)
drop table a;
create table a(a number);
insert into a values(1);
insert into a values(2);
commit;
update a set a=10 where a=2;
--新打开一个SQL*Plus窗口
--(第二个sqlplus(2))
select * from a;
--可以看到a=1,2的纪录
update a set a=11 where a=1;
--back to sqlplus(1)
select * from a;
update a set a=13 where a=1;
--locked!
--(第二个sqlplus(2))
select * from a;
--可以看到a=2的纪录
update a set a=10 where a=2;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -