- 10
- 0
- 约5.82千字
- 约 5页
- 2017-06-19 发布于湖北
- 举报
模拟环境
SQL create table t_p(id number primary key,name varchar2(100));
??
Table created.
??
SQL create table t_f(fid number primary key,pid number, foreign key(pid) references? t_p(id));
??
Table created.
??
--会话1
SQL insert into t_p values(1,xifenfei);
??
1 row created.
??
SQL commit;
??
Commit complete.
??
--会话2
SQL insert into t_f values(1,1);
??
1 row created.
??
SQL commit;
??
--会话1
SQL insert into t_p values(2,XIFENFEI);
??
1 row created.
??
--会话2
SQL insert into t_f values(2,2);
--hang住 通过实验发现,当主键数据没有提交,然后在外键表中插入该数据外键数据时,该条记录会处于hang住状态(等待),那是什么原因导致了这个等待呢?对会话2做一个10046的tr
原创力文档

文档评论(0)