Product Documentation

SQL Reference Guide

Previous Topic

Next Topic

ADD_MONTHS function (extension)

Syntax

ADD_MONTHS ( date_expression, integer_expression )

Description

The scalar function ADD_MONTHS adds to the date value specified by the date_expression, the given number of months specified by integer_expression and returns the resultant date value.

Example

SELECT *

FROM customer

WHERE ADD_MONTHS (start_date, 6) > SYSDATE ;

Notes

  • The first argument must be of DATE type.
  • The second argument to the function must be of numeric type.
  • The result is of type DATE.
  • If any of the arguments evaluate to null, the result is null.

TOCIndex