Which data type would you use for such a column in the table?

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?

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



Leave a Reply 8

Your email address will not be published. Required fields are marked *


Md. Liakat Ali

Md. Liakat Ali

I did not understood properly…….can any one explain me

umesh bhutada

umesh bhutada

— 4 days, 5 hours, 12 minutes, 10 seconds, and 222 thousandths of a second
INTERVAL ‘4 5:12:10.222’ DAY TO SECOND(3)

networkmanagers

networkmanagers

B

doris

doris

timestamp is stored a time point not a period. so C,D are wrong. For A is precise to month does not fit condition5 So the answer is B