choose two. You need to calculate the number of days from 1st January 2019 until today. Dates are stored in the defaul
choose two.
You need to calculate the number of days from 1st January 2019 until today.
Dates are stored in the default fORMat of DD-MON-RR.
Which two queries give the required output?
A) SELECT SYSDATE - TO_DATE (" 01-JANUARY-2019" ) FROM DUAL;
B) SELECT TO_DATE (SYSDATE, " DD/MONTH/YYYY" ) - "01/JANUARY/2019" FROM DUAL;
C) SELECT ROUND (SYSDATE - TO_DATE(" 01/JANUARY/2019" ) ) FROM DUAL;
D) SELECT TO_CHAR (SYSDATE, " DD-MON-YYYY") - "01-JAN-2019" FROM DUAL;
E) SELECT ROUND (SYSDATE- "01-JAN-2019") FROM DUAL:
Answer:AC
(解析:在进行日期计算的时候需要用转换函数把字符型的转换成日期型,oracle 不会隐式转换。)
--结束END--
本文标题: 【2019年8月版】OCP 071认证考试原题-第38题
本文链接: https://lsjlt.com/news/2676.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-10-23
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0