ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 047-218

047-218

原创 Linux操作系统 作者:jbymy2000 时间:2012-03-19 14:02:40 0 删除 编辑
218. Evaluate the following query:
SELECT INTERVAL '300' MONTH, INTERVAL '542' 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
Answer: A
Eg:
1: SELECT INTERVAL'300'MONTH, INTERVAL'54-2'YEAR TO MONTH,
INTERVAL'11:12:10.1234567' HOUR TO SECOND FROM dual;
+25-00
+54-02
+00 11:12:10.123457
2: SQL> SELECT INTERVAL'24'MONTH from dual;
+02-00
3: SELECT INTERVAL'25'MONTH from dual;
+02-01
4:SELECT INTERVAL'54-12'year to month from dual;
SELECT INTERVAL'54-12'year to month from dual
ORA-01843: 无效的月份 (注:月份是0-11之间的数字)

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11312660/viewspace-719008/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 047-215
下一篇: 047-235
请登录后发表评论 登录
全部评论

注册时间:2012-01-10

  • 博文量
    416
  • 访问量
    205681