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. 使用ES-Hadoop 6.5.4编写MR将数据索引到ES

    目录 1. 开发环境 2. 下载地址 3. 使用示例 4. 参考文献 1. 开发环境 Elasticsearch 6.5.4 ES-Hadoop 6.5.4 Hadoop 2.0.0 2. 下载地址 ...

  2. ArcEngine调用FeatureToLine工具传参问题

    FeatureToLine工具的in_features参数不能为内存图层,否则会报内存错误,正确的写法如下: FeatureToLine ftrToLine = new FeatureToLine() ...

  3. 解决opacity属性在低版本IE浏览器下失效的方法

    以前,一直都以为ie9以下的版本不支持opacity属性.所以就同时使用 opacity和ie独特的filter蒙版.但是有些时候需要一些动态的效果,就比如层的渐渐消失,隐藏,就需要使用动态变化的op ...

  4. jquery text() html() val()

    test text() 返回 test html() 返回 test val() 没值, val() 适用于有value属性的元素, 例如: input

  5. webkit com wrapper 推荐!

    https://groups.google.com/forum/#!topic/microsoft.public.vb.general.discussion/ZaFY95aDZoY http://ww ...

  6. [SoapUI]获取Project,Test Suite,Test Case各个级别参数的值

    String testResultPath = testRunner.testCase.testSuite.project.getPropertyValue( "testResultPath ...

  7. 解决win7和2008连接windows 2003远程桌面很卡的问题

    解决win7和2008连接windows 2003远程桌面很卡的问题 来源:http://www.hack1990.com/ 作者:佚名 时间:2013-04-12 TAG: 我要投稿 原因在于从vi ...

  8. C++ 类 & 对象-类成员函数-类访问修饰符-C++ 友元函数-构造函数 & 析构函数-C++ 拷贝构造函数

    C++ 类成员函数 成员函数可以定义在类定义内部,或者单独使用范围解析运算符 :: 来定义. 需要强调一点,在 :: 运算符之前必须使用类名.调用成员函数是在对象上使用点运算符(.),这样它就能操作与 ...

  9. 变分贝叶斯VBEM 由浅入深

    变分贝叶斯EM指的是变分贝叶斯期望最大化(VBEM, variational Bayes expectation maximization),这种算法基于变分推理,通过迭代寻找最小化KL(Kullba ...

  10. select for update [nowait]

    Syntax The NOWAIT and WAIT clauses let you tell the database how to proceed if the SELECT statement ...