Oracle Database SQL — Question 21

In your session NLS_DATE_FORMAT is set to DD-MON-RR.

Which two queries display the year as four digits? (Choose two.)

Answer options

Correct answer: B, E

Explanation

The correct options B and E utilize the TO_CHAR function with the format 'MM/DD/YYYY' and 'dd-mon-yyyy', which display the year in four digits. Options A and C incorrectly use TO_DATE instead of TO_CHAR, and D does not specify a date format, while F also misuses TO_DATE for the desired output format.