【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 ...
随机推荐
- IOS上架截屏 屏幕快照
IOS上架截屏,屏幕快照,4种屏幕尺寸,每种尺寸5张软件功能截图. 大小等于对应设备的屏幕的像素大小.使用模拟器,command +s截图就可以了虚拟机里的手机截屏就保存在mac 桌面上了.jpg,p ...
- Maven配置本地仓库
当我们在myeclipse中update maven时可能会报错User setting file does not exist C:\Users\lenevo\.m2\setting.xml,以致于 ...
- sudo免密码
很多都是修改/etc/sudoers权限为740再加上一句 ALL=NOPASSWD:ALL 或者加一句 yourname ALL=(ALL) NOPASSWD: ALL 然后权限改回440 先说第一 ...
- python:dist-packages && site-packages
先简单描述下问题.我用的ubuntu,源码编译安装的python3.我安装一些库,需要通过apt-get方式安装,这个时候就会遇到python找不到这些库的问题. 有个文章可以简单看看:http:// ...
- 40. Combination Sum II (Back-Track)
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in ...
- Visual Studio 2013 boost
E:\Visual Studio 2013\install\VC\bin\amd64>E:\IFC\boost_1_56_0_vs2013'E:\IFC\boost_1_56_0_vs2013' ...
- 自己动手搭建Git服务器-Gitblit
首先到官网http://gitblit.com/下载最新版本的Gitblit GO 解压缩到本地目录中 E:\git\gitblit132 官方文档:http://gitblit.com/setu ...
- Forms in Angular 2
Input handling is an important part of application development. The ng-model directive provided in A ...
- pyspider示例代码二:解析JSON数据
本系列文章主要记录和讲解pyspider的示例代码,希望能抛砖引玉.pyspider示例代码官方网站是http://demo.pyspider.org/.上面的示例代码太多,无从下手.因此本人找出一下 ...
- JQuery 对象和事件
JQuery 对象和事件 一:JQuery 对象和 Dom 对象 在使用 JQuery 过程中,我们一般(也是绝大多数情况下,除非我们使用了第二个框架)只有两类对象,即:JQuery 对象和 Dom ...