You would like to display the system date in the format "Monday, 01 June, 2001". Which SELECT statement should you use?

  1. SELECT TO_DATE(SYSDATE, 'FMDAY, DD Month, YYYY') FROM dual;

  2. SELECT TO_CHAR(SYSDATE, 'FMDD, DY Month, 'YYYY') FROM dual;

  3. SELECT TO_CHAR(SYSDATE, 'FMDay, DD Month, YYYY') FROM dual;

  4. SELECT TO_CHAR(SYSDATE, 'FMDY, DDD Month, YYYY') FROM dual;

  5. SELECT TO_DATE(SYSDATE, 'FMDY, DDD Month, YYYY') FROM dual;


Correct Option: C
Explanation:

To solve this question, the user needs to know the basic SQL functions like TO_CHAR and SYSDATE and their usage and format masks.

Option A: This option is incorrect because it uses the wrong format mask and does not give the required output format. The 'FMDAY' format mask is not correct to get the desired output format.

Option B: This option is incorrect because it uses the wrong format mask and does not give the required output format. The 'FMDD' format mask is not correct to get the desired output format.

Option C: This option is correct. It uses the correct format mask and gives the required output format. The 'FMDay' format mask gives the day of the week in the full name format and 'DD Month, YYYY' gives the date in the required format.

Option D: This option is incorrect because it uses the wrong format mask and does not give the required output format. The 'FMDY' format mask is not correct to get the desired output format.

Option E: This option is incorrect because it uses the wrong function and format mask. TO_DATE function is used to convert a string to a date, not to format the date. Additionally, 'DDD' format mask is not required to get the desired output format.

Therefore, the answer is:

The Answer is: C. SELECT TO_CHAR(SYSDATE, 'FMDay, DD Month, YYYY') FROM dual;

Find more quizzes: