日期:2014-05-18  浏览次数:20485 次

面试题目。。。非常紧急。。。在线等。谢谢。。。。
Consider   the   following   transaction   code:

Begin   Transaction
Update   names_table   set   employee_name   =   "Ramesh "   where   employee_name   =   "Mahesh "
Save   Transaction   SAVE_POINT
Update   salaries   set   salary=salary   +   900   where   employee_job   =   "Engineer "
Rollback   transaction
Commit   transaction
What   will   be   the   result   produced   by   this   transaction?    
  1.     ?Ramesh?   will   be   updated   to   ?Mahesh?,   but   salaries   of   engineers   will   not   be  
updated  
  2.     Neither   ?Ramesh?   will   be   updated   to   ?Mahesh?,   nor   the   salary   of   engineers   will   be   updated.  
  3.     ?Ramesh?   will   be   updated   to   ?Mahesh?   and   salary   of   engineers   will   also   be  
updated  
 

选哪个?谢谢!

------解决方案--------------------
先翻译翻译
------解决方案--------------------
两个UPDATE操作都会回滚
------解决方案--------------------
1--2
2--2
------解决方案--------------------
在我看来..上面没有正确答案
原因如下:
1.SQL里面的字符串不能用 " " 表示,因改为 ' '
2.第二句的查询条件是用 = 而字符串里面使用了 % MS不太妥吧.因该是没有结果可以显出来的