47、(10-6)choose two

You need to calculate the number of days from 1st January 2007 till date.

Dates are stored in the default format of dd-mon-rr.

Which two SQL statements would give the required output?

A) SELECT TO_DATE (SYSDATE, 'DD/MONTH/YYYY') - '01/JANUARY/2007' FROM DUAL;

B) SELECT SYSDATE - TO_DATE ('01/JANUARY/2007') FROM DUAL;

C) SELECT SYSDATE -'01-JAN-2007' FROM DUAL;

D) SELECT SYSDATE - TO_DATE ('01-JANUARY-2007') FROM DUAL;

E) SELECT TO_CHAR (SYSDATE, 'DD-MOM-YYYY') - '01-JAN-2007' FROM DUAL;

Answer:BD

(解析:对数据进行混合运算时必须要用转换函数转换为日期格式,因为它不会隐式转换,但是我们在insert

数据时,会实现隐式转换。

SQL> SELECT SYSDATE - TO_DATE ('01-1 月-2007') FROM DUAL;

或者:

SQL> SELECT SYSDATE - TO_DATE ('01/1 月/2007') FROM DUAL;

)

【ocp-12c】最新Oracle OCP-071考试题库(47题)的更多相关文章

  1. 【OCP题库-12c】最新CUUG OCP 071考试题库(72题)

    72.View the exhibit for the structure of the STUDENTand FACULTYtables. STUDENT Name Null? Type ----- ...

  2. 【OCP题库-12c】最新CUUG OCP 071考试题库(71题)

    71.(32-18) choose three Which three statements indicate the end of a transaction? (Choose three.) A) ...

  3. 【OCP题库-12c】最新CUUG OCP 071考试题库(70题)

    70.(31-2)choose the best answer: View the Exhibit and examine the structure of the Book table. The B ...

  4. 【OCP题库-12c】最新CUUG OCP 071考试题库(69题)

    69.(31-1)choose the best answer: Evaluate the following query: SELECT INTERVAL '300' MONTH, INTERVAL ...

  5. 【OCP题库】最新CUUG OCP 12c 071考试题库(68题)

    68.(29-13)choose two: Which two statements are true? (Choose two.) A) DICTIONARY is a view that cont ...

  6. 【OCP题库】最新CUUG OCP 12c 071考试题库(67题)

    67.(25-8)choose the best answer: View the Exhibit and examine the structure of CUSTOMERS table. Eval ...

  7. 【OCP题库】最新CUUG OCP 12c 071考试题库(66题)

    66.(22-19)choose two Examine the structure proposed for the TRANSACTIONS table: Which two statements ...

  8. 【OCP题库】最新CUUG OCP 12c 071考试题库(65题)

    65.(22-16) choose the best answer: The CUSTOMERS table has the following structure: You need to writ ...

  9. OCP 12c最新考试题库及答案(071-2)

    2019-02-12 16:23:54   2.(4-7) choose the best answer:You need to display the first names of all cust ...

  10. 【OCP-12c】2019年CUUG OCP 071考试题库(80题)

    80.View the exhibit and examine the structure in ORDERS and ORDER_ITEMS tables. You need to create a ...

随机推荐

  1. maven 中的依赖

  2. LMAX系统架构

    本文转载自:LMAX系统架构 ,(非常感谢作者yfx416分享好文) 很多架构师都面临这么一个问题:如何设计一个高吞吐量,低延时的系统?面对这个问题,各位都有自己的答案.但面对这个问题,大家似乎渐渐形 ...

  3. S 导入公司数据

    导入公司数据,使用INSERT [Public] ConnectString=host="siebel://10.10.0.46:2321/HC_CRM/SMObjMgr_chs Conne ...

  4. 关于ErrorPage

    JSP里创建一个网页test.jsp, 让这个网页上面出现一个错误, 再创建一个切换页面error.jsp, 使test.jsp如果出现错误就切换到error.jsp上, 但是怎么试都是出现一个网页上 ...

  5. 利用 Chrome 原生工具进行网页长截图

    转自https://sspai.com/post/42193 要想使用截图功能,你需要首先确保 Chrome 已升级至 59 或更高版本.在想要截图的网页中,首先按下 ⌘Command + ⌥Opti ...

  6. 使用寄存器点亮LED等

    最基本的输入功能是检测外部输入电平,如把 GPIO引脚连接到按键,通过电平高低区分按键是否被按下. 基本结构分析 2. P-MOS管和 N-MOS管 main.c中的main函数

  7. Devexpress VCL Build v2013 vol 13.2.2 发布

    devexpress 2013 的第二个大版本出来了,一如既往, 基本上还是一个大补丁包.各位看官,自己看. What's New in 13.2.2 (VCL Product Line)   New ...

  8. Net下的 ORM框架介紹(转)

    http://www.cnblogs.com/zhaoyx/articles/1896638.html 在.NET平台下,关于数据持久层框架非常多,本文主要对如下几种做简要的介绍并推荐一些学习的资源: ...

  9. ManualResetEvent,AutoResetEvent说明

    相信不少人对ManualResetEvent,AutoResetEvent的状态比较晕,下面是本人认为最精简的理解 1.只有2种状态,终止态 And 非终止态 终止状态,既然是状态那么一定对应事物,这 ...

  10. win10下安装centos7双系统

    国庆最后一天了,闲来无事装个双系统,用虚拟机的linux总有些不方便. window下安装linux双系统有两中方法: 1.U盘安装 (我采用的方法,后面详述) 2.EasyBCD工具安装 (使用Ea ...