Quick Search:
 The Oracle YEAR TO MONTH Literal      [Return To Index] Jump to:  


INTERVAL YEAR TO MONTH is an interval literal that stores a period of time using the YEAR and MONTH datetime fields.

An interval literal specifies a period of time, and Oracle supports two types of interval literals: YEAR TO MONTH and DAY_TO_SECOND. You can specify these differences in terms of years and months, or in terms of days, hours, minutes, and seconds. Each type contains a leading field and may contain an optional trailing field.

Note that when specifying a trailing field it must be less significant than the leading field. For example, INTERVAL '0-1' MONTH TO YEAR is not valid. Also note that YEAR TO MONTH performs implicit rounding to nearest value. Since you can't store a partial month in the YEAR TO MONTH interval, it will round the months if you have a partial month.

Related Links:
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org