Months_between will return negative numbers....
-
True
-
False
Reveal answer
Fill a bubble to check yourself
A
Correct answer
Explanation
MONTHS_BETWEEN(date1, date2) returns the number of months between two dates. If date1 is earlier than date2, the result is negative. For example, MONTHS_BETWEEN('01-Jan-2024', '01-Mar-2024') returns -2.
AI explanation
MONTHS_BETWEEN(date1, date2) in Oracle SQL returns a negative number whenever date1 is earlier than date2 — the function simply computes (date1 − date2) in months, so the sign depends on argument order, not just magnitude. For example, MONTHS_BETWEEN(SYSDATE, SYSDATE+60) returns a negative value. So 'True' is correct: the function is not restricted to non-negative results.