Friday, October 12, 2018

Sample SQL function ADD_MONTHS in ODBC

 

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.
 
SYNTAX
ADD_MONTHS (date_expression , integer_expression)
 
EXAMPLE
SELECT COMPANYNAME,
             CREATE_DATE,
             ADD_MONTHS(CREATE_DATE, 3)
FROM CUSTOMERS;

No comments:

Post a Comment