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. nodepad++快捷键

    在用notepad++进行代码编辑的过程中,其实notepad++也可以进行单行.多行.区块注释和取消注释的....... 快捷键如下: 单行.多行注释              //方式       ...

  2. Daylight Saving Time

    [Daylight Saving Time] 夏时制,又称日光节约时制.日光節約時間(英语:Daylight saving time)或夏令时间(英语:Summer time),是一种为节约能源而人为 ...

  3. qemu模拟器下编译运行基于riscv指令集的Linux操作系统

      基本原理: 在物理服务器Ubuntu14.04上安装qemu模拟器,模拟器中运行基于riscv指令集编译的linux镜像文件. 用到的工具包括: riscv-qemu(模拟器,可以模拟运行risc ...

  4. Eclipse 安装PyDev开发Python及初步使用

    Eclipse 安装PyDev插件后可开发Python 参考网址:https://blog.csdn.net/wscdylzjy/article/details/44066977 具体请参考上述网址, ...

  5. svn版本分支及冲突解决笔记

    转载:http://blog.csdn.net/xuguiyi100/article/details/51966557 分支合并主干示例 1.主干工程右键选择merge合并下一步 2.选中merge ...

  6. Linux远程桌面实现(转)

    http://blog.csdn.net/txg703003659/article/details/6619652 先说一下本人的实现环境: 控制端:Ubuntu 11.04 被控制端:CentOS ...

  7. cocos2dx中使用tolua++使lua调用c++函数

    一直想学学cocos2dx中如何使用tolua++工具使得lua脚本调用C++函数,今天就来搞一下,顺便记录下来: 首先,我们打开cocos2dx-2.2.4中projects下的test的VS工程, ...

  8. cakephp执行原生sql语句

    $sql = 'select sum(amount) as amount from option_capital where status = 2 and amount > 0 and user ...

  9. [SoapUI] 通过Groovy脚本获取project所在的路径或者直接用${projectDir}

    import com.eviware.soapui.support.GroovyUtils def groovyUtils = new GroovyUtils( context ) def proje ...

  10. msys2 + clion安装所需的mingw64编译环境

    pacman -S mingw-w64-x86_64-toolchain 输出结果为: $ pacman -S mingw-w64-x86_64-toolchain:: 在组 mingw-w64-x8 ...