【Oracle 12c】CUUG OCP认证071考试原题解析(35)
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)的更多相关文章
- 【Oracle 12c】CUUG OCP认证071考试原题解析(30)
30.choose the best answer Examine the commands used to create DEPARTMENT_DETAILS and COURSE_DETAILS: ...
- 【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 ...
- 【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 ...
- 【Oracle 12c】CUUG OCP认证071考试原题解析(29)
29.choose the best answer Evaluate the following query: SQL> SELECT promo_name || q'{'s start dat ...
- 【12c OCP】CUUG OCP认证071考试原题解析(36)
36.choose the best answer View the Exhibits and examine the structures of the PRODUCTS, SALES, and C ...
- 【12c OCP】CUUG OCP认证071考试原题解析(34)
34.choose two View the Exhibit and examine the structure of the PRODUCT_INFORMATION and INVENTORIES ...
- 【12c OCP】CUUG OCP认证071考试原题解析(33)
33.choose the best answer View the Exhibit and examine the structure of the ORDER_ITEMS table. Exami ...
- 【OCP认证12c题库】CUUG 071题库考试原题及答案(28)
28.choose the best answer Evaluate the following SQL statement: SQL> SELECT promo_id, promo_categ ...
- 【OCP认证12c题库】CUUG 071题库考试原题及答案(27)
27.choose two The SQL statements executed in a user session are as follows: SQL> CREATE TABLE pro ...
随机推荐
- excel拼接数据宏
将sheet2的A2 和 G2 加上 sheet5的A2和B2合一起生成新的sheet--就是将两个sheet的指定列前后拼接一起作为一个新的sheet Sub addwork() Sheets ...
- vs读取ini文件
读取string类型: DWORD GetPrivateProfileString(LPCTSTR lpAppName,LPCTSTR lpKeyName,LPCTSTR lpDefaut,LPSTR ...
- JDK动态代理代码示例
JDK动态代理代码示例 业务接口 实现了业务接口的业务类 实现了InvocationHandler接口的handler代理类 1.业务接口 package com.wzq.demo01; /** * ...
- C++全总结
// CPPTEST.cpp : 定义控制台应用程序的入口点. // #include "stdafx.h" #include<iostream> #include & ...
- CentOS装机必备-基本设置以及缺失文件
主要是虚拟机中安装CentOS每次总会做一些设置,记录下来方便以后. 纯粹基本设置,比如本地SecureCRT可以连接虚拟机中的CentOS. 复杂的非基本设置见:Linux 命令集锦 设置网络 自 ...
- swarm调度
Swarm filters Configure the available filters 过滤器分为两类,即节点过滤器和容器配置过滤器. 节点过滤器对Docker主机的特性或Docker守护程序的配 ...
- javascript中的属性类型
ECMA-262第5版在定义只有内部才用的特性(attribute)时,描述了属性(property)的各种特性.ECMA-262定义这些特性是为了实现javascript引擎用的,因此在javasc ...
- linux install jupyter notebook
install sudo pip install jupyter notebook start sudo jupyter notebook 一般,文件目录默认在你启动的位置.你可以在notebook里 ...
- 寻找hash值——把int array看成是一个整数
QUESTION: Write a class DominoChecker that has a method called addBox(int[]) that takes a box of fiv ...
- DataGuard的cascading standby(1拖N的模式)
在Oracle11.2.0.2版本后,dataguard支持级联模式传输日志,即日志传输可以从A到B,B到C,B到D,等等,无穷无尽 cascading standby可以分担主库传输日志到多个备库的 ...