The definition for interval_term can be expressed in four forms:
- interval_term * numeric_factor
- interval_term / numeric_factor
- numeric_term * interval_factor
This example uses the second definition.
SELECT (INTERVAL '3-07' YEAR TO MONTH) * 4;
The interval_term in this operation is INTERVAL '3-07' YEAR TO MONTH.
The numeric_factor is 4.
The processing involves the following stages:
- The interval is converted into 43 months as an INTEGER value.
- The INTEGER value is multiplied by 4, giving the result 172 months.
- The result is converted to '14-4'.