Wednesday, June 15, 2022

INTERVAL YEAR TO MONTH Data Type

1.    INTERVAL YEAR TO MONTH stores a period of time using the YEAR and MONTH datetime fields.

2.    This data type is useful for representing the difference between two datetime values when only the year and month values are significant.

 Specify INTERVAL YEAR TO MONTH as follows:

 INTERVAL YEAR [(year_precision)] TO MONTH

 where year_precision is the number of digits in the YEAR datetime field.

The default value of year_precision is 2.

You have a great deal of flexibility when specifying interval values as literals. Refer to Interval Literals for detailed information on specifying interval values as literals.

 

No comments:

Post a Comment