rollbackExamine the structure of the EMPLOYEES table:EMPLOYEE_ID NUMBER Primary KeyFIRST_NAME VARCHAR2(25)LAST_NAME VARCHAR2(25)HIRE_DATE DATEYou issue these statements:CREATE table new_emp ( employee_id NUMBER,name VARCHAR2(30));INSERT INTO new_emp

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/28 04:37:10
rollbackExamine the structure of the EMPLOYEES table:EMPLOYEE_ID NUMBER Primary KeyFIRST_NAME VARCHAR2(25)LAST_NAME VARCHAR2(25)HIRE_DATE DATEYou issue these statements:CREATE table new_emp ( employee_id NUMBER,name VARCHAR2(30));INSERT INTO new_emp
xT[OA+'@\Y1T4ۢᩙCqwٙZ * 1$h4R$ʟ¿pv7"-1>͹|9;g-M:ipz-E;%'iQ2A'`>BP`)O7+5T@o/*E"=譑:'~`RB4Q-Fei\un`p6 WPb+ *9#2ii(SelWAbǔ!v[67k re`dEƴ:Α<.j@"!T0l:P -(r q5iwއt[9vOkɊu;81`d<, u5~Pܳm`t2o= G/tTz b$,;[-xObjZml.CW]Ync}OdF ڥ" ;E}jV{c޳{m "Fjìdp.u7

rollbackExamine the structure of the EMPLOYEES table:EMPLOYEE_ID NUMBER Primary KeyFIRST_NAME VARCHAR2(25)LAST_NAME VARCHAR2(25)HIRE_DATE DATEYou issue these statements:CREATE table new_emp ( employee_id NUMBER,name VARCHAR2(30));INSERT INTO new_emp
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:EMPLOYEE_ID NUMBER Primary KeyFIRST_NAME VARCHAR2(25)LAST_NAME VARCHAR2(25)HIRE_DATE DATEYou issue these statements:CREATE table new_emp ( employee_id NUMBER,name VARCHAR2(30));INSERT INTO new_emp
Savepoint 就是设置一个 "保存点", 可以 Rollback to 到这个点上面
如果 commit 了, 那么所有的 Savepoint 就没用了.
如果 Rollback . 没有指定 Rollback 到哪一个点上.
意味着 全部 Rollback
所以,答案是 You have no rows in the table