Oracle Database SQL — Question 93
The SYSDATE function displays the current Oracle Server date as:
21-MAY-19
You wish to display the date as -
MONDAY, 21 MAY, 2019 -
Which statement will do this?
Answer options
- A. SELECT TO_DATE(SYSDATE, 'FMDAY, DD MONTH, YYYY') FROM DUAL;
- B. SELECT TO_CHAR(SYSDATE, 'FMDD, DAY MONTH, YYYY') FROM DUAL;
- C. SELECT TO_CHAR(SYSDATE, 'FMDAY, DD MONTH, YYYY') FROM DUAL;
- D. SELECT TO_CHAR(SYSDATE, 'FMDAY, DDTH MONTH, YYYY') EROM DUAL;
Correct answer: C
Explanation
The correct answer is C because it correctly formats the date to include the full day name, day of the month, full month name, and year. Option A is incorrect as it uses TO_DATE instead of TO_CHAR, which will not format the date as desired. Option B lacks the full day name formatting, and option D contains a typo ('EROM' instead of 'FROM') and also incorrectly formats the day to include 'TH'.