rollback
Examine the structure of the EMPLOYEES table:
EMPLOYEE_ID NUMBER Primary Key
FIRST_NAME VARCHAr2(25)
LAST_NAME VARCHAr2(25)
HIRE_DATE DATE
You issue these statements:
CREATE table new_emp ( employee_id NUMBER,name VARCHAr2(30));
INSERT INTO new_emp SELECt employee_id ,last_name from employees;
Savepoint s1;
UPDATe new_emp set name = UPPER(name);
Savepoint s2;
Delete from new_emp;
Rollback to s2;
Delete from new_emp where employee_id =180;
UPDATE new_emp set name = 'James';
Rollback to s2;
UPDATE new_emp set name = 'James' WHERe employee_id =180;
Rollback;
At the end of this transaction,what is true?
A.You have no rows in the table.
B.You have an employee with the name of James.
C.You cannot roll back to the same savepoint more than once.
D.Your last update fails to update any rows because employee ID 180 was already deleted.
Answer:A
这个回滚到什么地方 不是回到s1
rollbackExamine the structure of the EMPLOYEES table:EMPLOYE
答案:1 悬赏:70 手机版
解决时间 2021-07-22 01:28
- 提问者网友:你给我的爱
- 2021-07-21 14:54
最佳答案
- 五星知识达人网友:从此江山别
- 2021-07-21 15:12
Savepoint 就是设置一个 保存点, 可以 Rollback to 到这个点上面
如果 commit 了, 那么所有的 Savepoint 就没用了.
如果 Rollback . 没有指定 Rollback 到哪一个点上.
意味着 全部 Rollback
所以,答案是 You have no rows in the table
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯