ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 047-047

047-047

原创 Linux操作系统 作者:jbymy2000 时间:2012-03-17 10:05:37 0 删除 编辑
47. Given below are the SQL statements executed in a user session:
CREATE TABLE product
(pcode NUMBER(2),
pname VARCHAR2(10));
INSERT INTO product VALUES(1, 'pen');
INSERT INTO product VALUES (2,'pencil');
SAVEPOINT a;
UPDATE product SET pcode = 10 WHERE pcode = 1;
SAVEPOINT b;
DELETE FROM product WHERE pcode = 2;
COMMIT;
DELETE FROM product WHERE pcode=10;
ROLLBACK TO SAVEPOINT a;
Which statement describes the consequences?
A. No SQL statement would be rolled back
B. Both the DELETE statements would be rolled back.
C. Only the second DELETE statement would be rolled back.
D. Both the DELETE statements and the UPDATE statement would be rolled back.
Answer: A
试验证明在 ROLLBACK TO SAVEPOINT前不能有COMMIT命令,否则报错: ORA-01086:
从未创建保存点 'A'
要仔细看题

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11312660/viewspace-718815/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 047-046
下一篇: 047-054
请登录后发表评论 登录
全部评论

注册时间:2012-01-10

  • 博文量
    416
  • 访问量
    204216