- 最后登录
- 2019-6-19
- 在线时间
- 18 小时
- 威望
- 0
- 金钱
- 354
- 注册时间
- 2016-10-13
- 阅读权限
- 10
- 帖子
- 232
- 精华
- 1
- 积分
- 0
- UID
- 2488
|
154#
发表于 2016-12-6 14:19:26
172:
The SQL statements executed in a user session are as follows:
SQL> CREATE TABLE product
(pcode NUMBER(2),
pname VARCHAR2(10));
SQL> INSERT INTO product VALUES (1, 'pen');
SQL> INSERT INTO product VALUES (2,'pencil');
SQL> SAVEPOINT a;
SQL> UPDATE product SET pcode = 10 WHERE pcode = 1;
SQL> SAVEPOINT b;
SQL> DELETE FROM product WHERE pcode = 2;
SQL> COMMIT;
SQL> DELETE FROM product WHERE pcode=10;
Which two statements describe the consequences of issuing the ROLLBACK TO SAVE POINT a command
in the session? (Choose two.)
A. The rollback generates an error.
B. No SQL statements are rolled back.
C. Only the DELETE statements are rolled back.
D. Only the second DELETE statement is rolled back.
E. Both the DELETE statements and the UPDATE statement are rolled back.
172:
SQL语句执行在一个用户会话如下:
SQL> CREATE TABLE product
(pcode NUMBER(2),
pname VARCHAR2(10));
SQL> INSERT INTO product VALUES (1, 'pen');
SQL> INSERT INTO product VALUES (2,'pencil');
SQL> SAVEPOINT a;
SQL> UPDATE product SET pcode = 10 WHERE pcode = 1;
SQL> SAVEPOINT b;
SQL> DELETE FROM product WHERE pcode = 2;
SQL> COMMIT;
SQL> DELETE FROM product WHERE pcode=10;
哪两句关于在上述会话中执行ROLLBACK TO SAVE POINT a命令后的描述是正确的?(选择两个)
A. rollback报错
B. 没有SQL语句回滚
C. 只有DELETE语句回滚
D. 只有第二个DELETE语句回滚
E. DELETE和UPDATE语句回滚
答案:AB
Commit之后,事务就结束了,a是三个结束事务的回滚点,执行ROLLBACK SAVE POINT a会报错。 |
|