Multiple choice technology databases

Assuming today is Monday, 10 July 2000, what is returned by this statement: SELECT to_char(NEXT_DAY(sysdate, 'MONDAY'), 'DD-MON-RR') FROM dual;

  1. 10-JUL-00

  2. 17-JUL-00

  3. 12-JUL-00

  4. 11-JUL-00

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

The NEXT_DAY function returns the first occurrence of a given day of the week that is strictly after the input date. Since today (sysdate) is Monday, July 10, 2000, NEXT_DAY returns the following Monday, July 17, 2000. The to_char with 'DD-MON-RR' formats this as '17-JUL-00'. Note that RR handles year 2000 dates in a specific way.