QuestionQ82

VerifiedCreating and Managing Tables

You have been assigned to create a table for a banking application.

One column must satisfy these three requirements:

  1. Be stored in a format that supports date arithmetic without conversion functions
  2. Store a loan period of up to 10 years
  3. Be used to calculate interest for the number of days that the loan remains unpaid

Which data type should be used?

Explanation

INTERVAL DAY TO SECOND stores an elapsed period in days, hours, minutes, and seconds, so it directly supports day-based duration and interest calculations. For a period of up to 10 years, its leading day precision should be large enough to hold approximately 3,650 days, such as DAY(4).

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!