ITPub博客

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

047-030

原创 Linux操作系统 作者:jbymy2000 时间:2012-03-16 16:34:21 0 删除 编辑
30. You need to create a table for a banking application with the following
considerations:
1) You want a column in the table to store the duration of the credit period.
2) The data in the column should be stored in a format such that it can be
easily added and subtracted with
3) date type data without using the conversion functions.
4) The maximum period of the credit provision in the application is 30 days.
5) The interest has to be calculated for the number of days an individual
has taken a credit for.
Which data type would you use for such a column in the table?
A. INTERVAL YEAR TO MONTH
B. INTERVAL DAY TO SECOND
C. TIMESTAMP WITH TIME ZONE
D. TIMESTAMP WITH LOCAL TIME ZONE
Answer:B
Credit:信用 individual:个人 calculated:考虑
TIMESTAMP stores year, month, day, hours, minutes, and
seconds, and fractional seconds.
TIMESTAMP WITH TIME ZONE is used in tracking date information
across different time zones and geographical areas.
The TIMESTAMP WITH LOCAL TIME ZONE differs
from TIMESTAMP WITH TIME ZONE in that the time zone offset is not stored with
the column’s value, and the value retrieved is sent in the user’s local
session time zone.
INTERVAL YEAR(n) TO MONTH Stores a span of time defined in
only year and month values, where n is the number of digits used to define
the YEAR value.
INTERVAL DAY(n1) TO SECOND(n2) Stores a span of time defined
in days, hours, minutes, and seconds, where n1 is the precision for days,
and n2 is the precision for seconds.

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

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

注册时间:2012-01-10

  • 博文量
    416
  • 访问量
    204354