单选题
数据库系统管理员按照事务的方式执行下面的语句:
数据库系统管理员按照事务的方式执行下面的语句:
Create table tab1 (a int,b int)
insert into tabl values(1,2)
insert into tab1 values(2,3)
commit
Insert into tab1 values(2,3)
Insert into tab1 values(1,6)
Commit
Delete from tab1 where a=1
Insert into tab1 values(1,7)
Delete from tab1 where a=1
Insert into tab1 values(1,8)
数据库系统突然崩溃,系统重新启动后,该管理员执行
Select count(*) from tab1
数据库系统的输出是多少?
A
6
B
3
C
4
D
5
答案解析
正确答案:C
解析:
只有遇到Commit,数据执行才会生效,故只有4条insert into命令生效
