码迷,mamicode.com
首页 > 其他好文 > 详细

【第53题】【062题库】2019年OCP认证062考试新题

时间:2019-06-27 13:36:45      阅读:98      评论:0      收藏:0      [点我收藏+]

标签:which   table   加锁   following   man   tab   exec   data   iss   

53题、choose two

The HR user executes the following query on the EMPLOYEES table but does not issue COMMIT, ROLLBACK, or any data definition language (DDL) command after that:

SQL> SELECT job 

FROM employees

WHERE job=‘CLERK‘ FOR UPDATE OF empno;

HR then opens a second session.

Which two operations wait when executed in HR‘S second session?

A) SELECT job FROM employees WHERE job=‘CLERK‘ FOR UPDATE OF empno;

B) INSERT INTO employees(empno,ename,job) VALUES (2001,‘Harry‘,‘CLERK‘);

C) SELECT empno,ename FROM employees WHERE job=‘CLERK‘;

D) INSERT INTO employees(empno,ename) VALUES (1289,‘Dick‘);

E) LOCK TABLE employees IN EXCLUSIVE MODE;

Answer:AE

(解析:因为查询中用到了for update of,那么被查询到的行会被加锁,所以A答案会造成等待,E答案因为要锁整个表,所以也要发生等待。来自3组:1015267481)

【第53题】【062题库】2019年OCP认证062考试新题

标签:which   table   加锁   following   man   tab   exec   data   iss   

原文地址:https://www.cnblogs.com/cnblogs5359/p/11096403.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!