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. 03-JUL-00

  2. 10-JUL-00

  3. 12-JUL-00

  4. 11-JUL-00

  5. 17-JUL-00


Correct Option: E
Explanation:

To solve this question, the user needs to understand the function of each element of the SQL statement and how it affects the output.

The SQL statement is selecting a date and formatting it according to the given format string. Specifically:

  • sysdate returns the current date and time.
  • NEXT_DAY(sysdate, 'MONDAY') returns the next occurrence of the day specified as the second argument, after the current date and time (sysdate). In this case, it returns the next Monday after 10 July 2000, which is 17 July 2000.
  • to_char() converts the resulting date into a string using the format specified as the second argument. In this case, the format is 'DD-MON-RR', which returns the day of the month (DD), the abbreviated month name (MON), and the 2-digit year (RR).

Therefore, the correct answer is E. 17-JUL-00, as the SQL statement returns the formatted date of the next Monday after 10 July 2000, which is 17 July 2000.

Find more quizzes: