您的位置:首页 > 数据库

172.The SQL statements executed in a user session are as follows:

2016-04-13 11:11 489 查看
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.

答案:AB

解析:

A:正确,commit已经提交了之前的事务,那么SAVEPOINT a是不存在的

B:正确

C:错误,这里如果只执行rollback的话,那么这里第二个delete是对的

D:错误

E:错误
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: