Multiple choice technology databases

SELECT LAST_DAY('15-MAR-00') FROM DUAL.

  1. 30-MAR-00

  2. 31-MAR-00

  3. 15-MAR-00

  4. THERE IS NO FUNCTION LIKE LAST_DAY

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The Oracle SQL function LAST_DAY() returns the last day of the month for any given date. Since March always has 31 days, LAST_DAY('15-MAR-00') correctly returns '31-MAR-00'. This function is useful for calculating month-end dates in financial and reporting applications.