Applies to: Databricks SQL Databricks Runtime 10.0 and above
Creates an year-month interval from
years: An integral number of years, positive or negative
months: An integral number of months, positive or negative
INTERVAL YEAR TO MONTH.
Unspecified arguments are defaulted to 0.
If you provide no arguments the result is an
INTERVAL '0-0' YEAR TO MONTH.
The function is equivalent to executing:
INTERVAL year YEARS + INTERVAL month MONTHS.
As such each unit can be outside of its natural range as well as negative.