您的位置:首页 > 其它

OCP 1Z0 051 19

2014-05-15 10:45 134 查看
19. Evaluate the following query:

SELECT INTERVAL '300' MONTH,

INTERVAL '54-2' YEAR TO MONTH,

INTERVAL '11:12:10.1234567' HOUR TO SECOND

FROM dual;

What is the correct output of the above query?

A. +25-00 , +54-02, +00 11:12:10.123457

B. +00-300, +54-02, +00 11:12:10.123457

C. +25-00 , +00-650, +00 11:12:10.123457

D. +00-300 , +00-650, +00 11:12:10.123457

考点:INTERVAL

注意下面各语句的返回格式

SQL> select INTERVAL '20' year as "year" from dual;
year
---------------------------------------
+20-00
1 row selected

SQL> select INTERVAL '30' month as "month" from dual;
month
---------------------------------------
+02-06
1 row selected

SQL> select INTERVAL '90' day as "day" from dual;
day
---------------------------------------
+90 00:00:00
1 row selected

SQL> select INTERVAL '72' hour as "hour" from dual;
hour
---------------------------------------
+03 00:00:00
1 row selected

SQL> select INTERVAL '80' minute as "minute" from dual;
minute
---------------------------------------
+00 01:20:00
1 row selected
Executed in 0.015 seconds
SQL> select INTERVAL '3.15' second as "second" from dual;
second
---------------------------------------
+00 00:00:03.150000
1 row selected

SQL> select INTERVAL '2 12:30:59' DAY to second as "DAY to second" from dual;
DAY to second
---------------------------------------
+02 12:30:59.000000
1 row selected

SQL> select INTERVAL '13-3' year to month as "Year to month" from dual;
Year to month
---------------------------------------
+13-03
1 row selected


SQL> SELECT INTERVAL '300' MONTH,
2         INTERVAL '54-2' YEAR TO MONTH,
3         INTERVAL '11:12:10.1234567' hour TO SECOND
4    FROM dual;
INTERVAL'300'MONTH   INTERVAL'54-2'YEARTOMONTH      INTERVAL'11:12:10.1234567'HOUR
-------------------- ------------------------------ ---------------------------------------
+25-00               +54-02                         +00 11:12:10.123457
1 row selected


Answer: A
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: