【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 ... 
随机推荐
- kafka启动报java.net.UnknownHostException
			kafka启动报java.net.UnknownHostException 参考资料: 1.https://blog.csdn.net/zdxiq000/article/details/6258765 ... 
- docker 网络配置路由转发
			建好flannel 网络之后 iptables -L -n 查看 要全是accept iptables -P FORWARD ACCEPT 开启路由转发 修改/etc/sysctl.conf文件,添加 ... 
- Linux学习-linux系统下python升级到python3.6步骤详解,以及遇到的问题解决
			说明:一般linux会自带pyhton2.7 1.首先下载源tar包 可利用linux自带下载工具wget下载,如下所示: wget http://www.python.org/ftp/python/ ... 
- MapReduce Notes
			[MapReduce Notes] 1.一个Map/Reduce 作业的输入和输出类型如下所示: 2.Shuffle & Sort & Secondary Sort Reducer的输 ... 
- FP昨天的新单,今天交期回写到2020年
			昨天新单6900000053,回写交期到2020年.在此视图查看此单回写的日期V_OUT_SHIPMENT_PLAN_TESTS,可看到日期是2020年. 1.检查OUT_SHIPMENT_PLAN表 ... 
- Jenkins使用FTP进行一键部署及回滚2(Windows)(项目实践)
			转载:http://www.cnblogs.com/EasonJim/p/6295372.html Jenkins使用FTP进行一键部署及回滚2(Windows)(项目实践) 前提: 这一篇是继上一 ... 
- Gcc对头文件与库文件的搜索路径
			一.简介 对头文件与库文件的搜索路径不太清楚,编译.运行时老碰到问题,ldd查看程序的链接时,总是出现unkown链接. 二.头文件 gcc 在编译时寻找所需要的头文件 : 1)搜寻会从-I开始 2) ... 
- ubuntu 出来菜单栏和任务栏
			http://blog.csdn.net/terence1212/article/details/51340595 命令行输入:sudo apt-get install compizconfig-se ... 
- sublime填坑之旅:  格式代码, 缩进缩进
			前言:sublime是一款编程神器,轻巧又强大,适用于各种语言.这里介绍下如何快速缩进混乱代码,方便代码阅读. 原料:sublime text 3 1 混乱代码如下: 2 格式菜单选择: 英文: 菜 ... 
- Linux的系统引导
			启动引导: 1.主机加电自检,加载BIOS信息 2.读取MBR的引导文件[grub lilo] 3.引导linux内核 4.运行第一个进程init pid=1 5.进入相应的运行级别[0-6] 6.运 ... 
