35.choose the best answer

View the Exhibit and examine the description of the EMPLOYEES table.

Evaluate the following SQL statement:

SELECT first_name, employee_id, NEXT_DAY(ADD_MONTHS(hire_date,6),1) "Review" FROM employees;

The query was written to retrieve the FIRST_NAME, EMPLOYEE_ID, and review date for employees. The review date is the first Monday after the completion of six months

of the hiring.

The NLS_TERRITORY parameter is set to AMERICA in the session.

Which statement is true regarding this query?

A) The query would not execute because the NEXT_DAY function accepts a string as argument.

B) The query would execute to give the desired output.

C) The query would not execute because date functions cannot be nested.

D) The query would execute but the output would give review dates that are Sundays.

Answer:D

(解析:题目的意思是显示某个时间以后第一个周一的日期,但是西方人的第一天是星期天,

所以应该修改为 NEXT_DAY(ADD_MONTHS(hire_date,6),2)

步骤:

SQL> alter session set NLS_TERRITORY=america;

SQL> select next_day(sysdate,2) from dual;

NEXT_DAY(SYSDA

--------------

03-12 月-18 #这一天是周日

SQL> select next_day(sysdate,1) from dual;

NEXT_DAY(SYSDA

--------------

02-12 月-18 #这一天是周一

【Oracle 12c】CUUG OCP认证071考试原题解析(35)的更多相关文章

  1. 【Oracle 12c】CUUG OCP认证071考试原题解析(30)

    30.choose the best answer Examine the commands used to create DEPARTMENT_DETAILS and COURSE_DETAILS: ...

  2. 【Oracle 12c】CUUG OCP认证071考试原题解析(32)

    32.choose the best answer View the Exhibit and examine the data in EMP and DEPT tables. In the DEPT ...

  3. 【Oracle 12c】CUUG OCP认证071考试原题解析(31)

    31.choose the best answer Which statement is true regarding the USING clause in table joins? A) It c ...

  4. 【Oracle 12c】CUUG OCP认证071考试原题解析(29)

    29.choose the best answer Evaluate the following query: SQL> SELECT promo_name || q'{'s start dat ...

  5. 【12c OCP】CUUG OCP认证071考试原题解析(36)

    36.choose the best answer View the Exhibits and examine the structures of the PRODUCTS, SALES, and C ...

  6. 【12c OCP】CUUG OCP认证071考试原题解析(34)

    34.choose two View the Exhibit and examine the structure of the PRODUCT_INFORMATION and INVENTORIES ...

  7. 【12c OCP】CUUG OCP认证071考试原题解析(33)

    33.choose the best answer View the Exhibit and examine the structure of the ORDER_ITEMS table. Exami ...

  8. 【OCP认证12c题库】CUUG 071题库考试原题及答案(28)

    28.choose the best answer Evaluate the following SQL statement: SQL> SELECT promo_id, promo_categ ...

  9. 【OCP认证12c题库】CUUG 071题库考试原题及答案(27)

    27.choose two The SQL statements executed in a user session are as follows: SQL> CREATE TABLE pro ...

随机推荐

  1. Visio2013 64位下载安装以及破解激活教程

    特别说明:以下教程如果未能破解激活,请在断网条件下安装破解!!!! 安装: Visio2013 professional版下载地址:https://pan.baidu.com/s/1gzwcGTevV ...

  2. Maven 快速构建一个项目

    参考:http://www.spring4all.com/article/266 mvn archetype:generate -DgroupId=springboot -DartifactId=sp ...

  3. javascript 对象的扩展性

    javascript 对象 的可扩展性 javascript 对象中的可扩展性指的是:是否可以给对象添加新属性.所有的内置对象和自定义对象显示的都是可扩展的,对于宿主对象,则有javascript 引 ...

  4. JS计算字符长度、字节数 -- 转

    一个汉字在UTF-8编码中占用几个字节? 占用3个字节的范围 U+2E80 - U+2EF3 : 0xE2 0xBA 0x80 - 0xE2 0xBB 0xB3 共 115 个 U+2F00 - U+ ...

  5. css常用属性总结:背景background下篇

    前言:这段时间天天加班到10:30之后,简直是x了. 在上一篇文章中,分别解析了background各个属性的用法和注意细节.如果我们在项目上使用背景效果,如果使用下面的写法,你可能抓狂. body{ ...

  6. Hadoop Pipes

    [Hadoop Pipes] 1.MapContext的getInputSplit()可以用于获取当前mapper所对象的文件路经,也就是Pipes中,没有InputSplit接口/对象. 2.在Pi ...

  7. 118. Pascal's Triangle (Array)

    Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, Retu ...

  8. 自制精排 ePub 集、不定期更新(UPDATA-2015-8-2)

    说明 排版不说最好,上乘是必须的. 段落空行 首行缩进 具备清爽元数据 包含高清封面.目录 图片居中,图片标题以下标形式居中位于图片下* 支持多看/Kindle原生系统弹出注释,其他软件跳转注释* 各 ...

  9. 3-java_string学习笔记:

    java中String的常用方法

  10. NInject在函数中使用

    问题,今天我在使用Ajax的时候,发现请求到后台没法得到对象. 原来的写法是这样的: public class Baoming : IHttpHandler { [Inject] public IBL ...