zoukankan      html  css  js  c++  java
  • 【2019年8月版本】OCP 071认证考试最新版本的考试原题-第8题

    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;

  • 相关阅读:
    latex
    anaconda
    git stash
    YOLO训练Pedestrain
    OpenCL C
    OpenCL
    OpenVX
    caffe源码阅读
    居住证积分查询地址
    jdk 1.8内存逐步增大的一个bug
  • 原文地址:https://www.cnblogs.com/cnblogs5359/p/11691152.html
Copyright © 2011-2022 走看看