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

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

文章分类

全部博文(487)

文章存档

2023年(37)

2021年(151)

2020年(37)

2019年(222)

2018年(38)

我的朋友

分类: Oracle

2019-10-17 11:49:07

Choose the best answer

The EMPLOYEES table contains columns EMP_ID of data type NUMBER and HIRE_DATE of data type DATE

You want to display the date of the first Monday after the completion of six months since hiring

The NLS_TERRITORY parameter is set to AMERICA in the session and, therefore, Sunday is the first day ofthe week

Which query can be used?

A) SELECT emp_id,NEXT_DAY(ADD_MONTHS(hite_date,6), 'MONDAY') FROM employees;

B) SELECT emp_id,ADD_MONTHS(hire_date,6), NEXT_DAY('MONDAY') FROM employees;

C) SELECT emp_id,NEXT_DAY(MONTHS_BETWEEN(hire_date,SYSDATE),6) FROM employees;

D) SELECT emp_id,NEXT_DAY(ADD_MONTHS(hire_date,6),1) FROM employees;

Answer:A

(解析:本题 A 和 D 的答案非常相似,但是因为周日是第一天,所以 D 答案显示的是周日的日期。

在使用 next_day 的时候,要注意字符集,如果是中文的,就不能用 monday,而是用星期一:

SELECT NEXT_DAY(ADD_MONTHS(hiredate,6), '星期一') from emp2;

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