QuestionQ90

VerifiedCreating and Managing Tables

You need to create a table for a banking application. One column must meet the following requirements:

  1. It must store the duration of the credit period.
  2. Its data must be stored in a format that can be easily added to and subtracted from the DATE data type without conversion functions.
  3. The maximum credit-provision period in the application is 30 days.
  4. Interest must be calculated based on the number of days for which an individual has taken credit.

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

Explanation

INTERVAL DAY TO SECOND stores elapsed durations expressed in days and smaller time units. It can participate directly in arithmetic with DATE values, and its day component supports a credit term limited to 30 days and day-based interest calculations.

Community Discussion

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