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. VB.Net与C# 的语法比较

    最近看代码或写代码时,经常把VB与C#的基本语法搞混,为方便查看,特对其异同进行对比: 變數初始化 VB.NET 自動將所有的變數初始化成 0 或 nothing.C# 在你未初始化變數之前不准你用該 ...

  2. ubuntu上安装 MySQL 启动/停止 连接MySQL

    1.Ubuntu上安装MySQL服务   1.安装服务端   sudo apt-get install mysql-server    2.安装客户端   sudo apt-get install m ...

  3. Remove “Quick Access” entry in Eclipse Juno

    Here is a quick hack which doesn't require any plugin installation, instead you just need to add a f ...

  4. libcurl使用心得-包括下载文件不存在处理相关(转)

    libcurl使用心得 Libcurl为一个免费开源的,客户端url传输库,支持FTP,FTPS,TFTP,HTTP,HTTPS,GOPHER,TELNET,DICT,FILE和LDAP,跨平台,支持 ...

  5. cluster DNS

    [root@mhc1 dns]# pwd/root/test/k8s/kubernetes/cluster/addons/dns [root@mhc1 dns]# export DNS_SERVER_ ...

  6. S 导员工信息

    EXCEL模板 [Public] ConnectString=host="siebel://10.10.1.174:2321/SBA_NR_DEV/SMObjMgr_chs ConnectU ...

  7. SqlMapConfig.xml配置文件中的mapper映射器标签

    Mapper配置的几种方式: 1. <mapper resource=" "/> 使用相对于类路径的资源 如:<mapper resource="com ...

  8. MySQL中触发器

    触发器是与某个事件相关的特殊存储过程,与存储过程不同的是,存储过程需要用 call 调用而出发器不需要使用call调用调用. 也就是自己预先定义好了,当某个事件发生时,就会自动出发触发器进行相关的操作 ...

  9. 最意想不到的5个APP UI 设计范例

    现如今,智能手机已成为人们生活中不可或缺的一个物件,琳琅满目的手机APP充斥着各大应用市场.对于普通人来说,他们的衣食住行因此而变得简单方便:对设计师们来说,他们则面临更多的机遇和挑战.每位设计师都梦 ...

  10. [转]ASP.NET Web API对OData的支持

    http://www.cnblogs.com/shanyou/archive/2013/06/11/3131583.html 在SOA的世界中,最重要的一个概念就是契约(contract).在云计算的 ...