You are on page 1of 40

Example 7

This statement performs the converse of the ADD_MONTHS function in Example 5 on


page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8

You might expect the following statement to return


SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.

1999-03-31 , but it does not.

Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.

The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example

, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.

Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8

You might expect the following statement to return


SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.

1999-03-31 , but it does not.

Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.

The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example

, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.

Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8

You might expect the following statement to return


SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.

1999-03-31 , but it does not.

Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.

The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example

, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.

Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8

You might expect the following statement to return


SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.

1999-03-31 , but it does not.

Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.

The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example

, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.

Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8

You might expect the following statement to return


SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.

1999-03-31 , but it does not.

Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.

The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example

, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.

Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8

You might expect the following statement to return


SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.

1999-03-31 , but it does not.

Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.

The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example

, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.

Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8

You might expect the following statement to return


SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.

1999-03-31 , but it does not.

Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.

The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example

, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.

Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8

You might expect the following statement to return


SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.

1999-03-31 , but it does not.

Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.

The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example

, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.

Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8

You might expect the following statement to return


SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.

1999-03-31 , but it does not.

Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.

The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example

, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.

Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8

You might expect the following statement to return


SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.

1999-03-31 , but it does not.

Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.

The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example

, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.
Example 7
This statement performs the converse of the ADD_MONTHS function in Example 5 on
page 178.
You might expect it to return 1999-01-30 , which is the source date in that example
, but it
does not.
SELECT ADD_MONTHS ('1999-02-28' , -1);
ADD_MONTHS returns the result 1999-01-28.
The function performs as designed and this result is not an error, though it mig
ht not be what
you would expect from reading Example 5.
Example 8
You might expect the following statement to return 1999-03-31 , but it does not.
SELECT ADD_MONTHS ('1999-02-28' , 1);
ADD_MONTHS returns the result 1999-03-28.

You might also like