问题标题:
【rollbackExaminethestructureoftheEMPLOYEEStable:EMPLOYEE_IDNUMBERPrimaryKeyFIRST_NAMEVARCHAR2(25)LAST_NAMEVARCHAR2(25)HIRE_DATEDATEYouissuethesestatements:CREATEtablenew_emp(employee_idNUMBER,nameVARCHAR2(30));INSERTINTOnew_emp】
问题描述:
rollback
ExaminethestructureoftheEMPLOYEEStable:
EMPLOYEE_IDNUMBERPrimaryKey
FIRST_NAMEVARCHAR2(25)
LAST_NAMEVARCHAR2(25)
HIRE_DATEDATE
Youissuethesestatements:
CREATEtablenew_emp(employee_idNUMBER,nameVARCHAR2(30));
INSERTINTOnew_empSELECTemployee_id,last_namefromemployees;
Savepoints1;
UPDATEnew_empsetname=UPPER(name);
Savepoints2;
Deletefromnew_emp;
Rollbacktos2;
Deletefromnew_empwhereemployee_ id=180;
UPDATEnew_empsetname='James';
Rollbacktos2;
UPDATEnew_empsetname='James'WHEREemployee_ id=180;
Rollback;
Attheendofthistransaction,whatistrue?
A.Youhavenorowsinthetable.
B.YouhaveanemployeewiththenameofJames.
C.Youcannotrollbacktothesamesavepointmorethanonce.
D.YourlastupdatefailstoupdateanyrowsbecauseemployeeID180wasalreadydeleted.
Answer:A
这个回滚到什么地方不是回到s1
马雄鸣回答:
Savepoint就是设置一个"保存点",可以Rollbackto到这个点上面如果commit了,那么所有的Savepoint就没用了.如果Rollback.没有指定Rollback到哪一个点上.意味着全部Rollback所以,答案是Youhave...
点击显示
英语推荐
热门英语推荐