Exam 1z0-071 All QuestionsBrowse all questions from this exam
Question 107

A session's NLS_DATE_FORMAT is set to DD Mon YYYY.

Which two queries return the value 1 Jan 2019? (Choose two.)

    Correct Answer: B, D

    The correct answers are the queries that return the date in the format 'DD Mon YYYY' given the session's NLS_DATE_FORMAT setting. Using 'DATE' keyword ensures that the date is interpreted correctly and displayed in the NLS_DATE_FORMAT, making the query 'SELECT DATE '2019-01-01' FROM DUAL;' return '1 Jan 2019'. Using 'TO_DATE' function with the specified format 'YYYY-MM-DD' ensures the date is parsed correctly and respects the NLS_DATE_FORMAT setting, so 'SELECT TO_DATE('2019-01-01', 'YYYY-MM-DD') FROM DUAL;' returns '1 Jan 2019'. Other options either provide incorrect formats or do not convert to date properly.

Discussion
TheOracleWasTaken

B wouldnt work right bc it doesnt match the nls_parameter thing?. D works tho

lucemqy

B would work the date displayed will be the default NLS_DATE_FOMAT set

lucemqyOptions: BD

BD Works

FestoOptions: BD

BD IS CORRECT