1Z0-071 practice question 33 of 35
Which two statements execute successfully?
Full set: 326 questionsStatement A correctly uses the TODATE function. The input string '2019-DEC-25 15:30' perfectly matches the format model 'YYYY-MON-DD HH24:MI', and the NLS parameter 'NLSDATELANGUAGE=AMERICAN' ensures the month abbreviation 'DEC' is interpreted correctly. Statement D is also valid; the inner TODATE function converts the string to a DATE data type, and the outer TOCHAR function then converts this DATE value back into a string using the session's default date format (NLSDATEFORMAT).
B. The first argument to TOCHAR for date conversion must be a DATE, not a string. Also, 'M2' is not a valid format element; it should be 'MI'.
C. The inner TOCHAR function is used incorrectly. Its first argument for date formatting must be a DATE data type, not a character string.
E. The TOCHAR function is used incorrectly. Its first argument for date formatting must be a DATE data type, not a character string.
1. Oracle Database SQL Language Reference, 23c. "TODATE". The syntax is TODATE(char [, fmt [, 'nlsparam'] ]). Option A matches this syntax.
2. Oracle Database SQL Language Reference, 23c. "TOCHAR (datetime)". The syntax is TOCHAR(datetimeexpr [, fmt [, 'nlsparam'] ]). The first argument must be a datetime value.
3. Oracle Database SQL Language Reference, 23c. "Format Models". This section details valid format elements like YYYY, MON, HH24, and MI.
Keep practicing
Take the free 1Z0-071 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 1Z0-071 practice questions
- Question 2Which three statements are true about single row functions?
- Question 3Which statement executes successfully?
- Question 4Which two are true about transactions in the Oracle Database?
- Question 6Which two are true about external tables that use the ORACLE _DATAPUMP access driver?
- Question 9Which statement will execute successfully?
- Question 10Examine this statement: CREATE TABTE orders (sarial_no NUMBER UNIQUE, order_id NUMBER PRI…
