Chinaunix首页 | 论坛 | 博客
  • 博客访问: 673592
  • 博文数量: 487
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 4936
  • 用 户 组: 普通用户
  • 注册时间: 2018-07-05 13:59
个人简介

ocp考试资料群:569933648 验证码:ocp OCP 12c 19c考试题库解析与资料群:钉钉群号:35277291

文章分类

全部博文(487)

文章存档

2024年(2)

2023年(37)

2021年(151)

2020年(37)

2019年(222)

2018年(38)

我的朋友

分类: Oracle

2019-06-27 13:15:39

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答案因为要锁整个表,所以也要发生等待。)

阅读(1050) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~