nerdexam
Oracle

1Z0-082 · Question #1

You need to calculate the number of days from 1st January 2019 until today. Dates are stored in the default format of DD-MON-RR. Which two queries give the required output? (Choose two.)

The correct answer is A. SELECT TO_CHAR(SYSDATE, `DD-MON-YYYY') ?'01-JAN-2019' FROM DUAL; B. SELECT ROUND(SYSDATE ?'01-JAN-2019') FROM DUAL. You've hit your weekly limit · resets 5am (America/New_York)

SQL and PL/SQL

Question

You need to calculate the number of days from 1st January 2019 until today. Dates are stored in the default format of DD-MON-RR. Which two queries give the required output? (Choose two.)

Options

  • ASELECT TO_CHAR(SYSDATE, `DD-MON-YYYY') ?'01-JAN-2019' FROM DUAL;
  • BSELECT ROUND(SYSDATE ?'01-JAN-2019') FROM DUAL;
  • CSELECT ROUND(SYSDATE ?TO_DATE(`01/JANUARY/2019')) FROM DUAL;
  • DSELECT TO_DATE(SYSDATE, DD/MONTH/YYYY') ?01/JANUARY/2019' FROM DUAL;
  • ESELECT SYSDATE ?TO_DATE('01-JANUARY-2019') FROM DUAL;

How the community answered

(21 responses)
  • A
    81% (17)
  • C
    5% (1)
  • D
    5% (1)
  • E
    10% (2)

Explanation

You've hit your weekly limit · resets 5am (America/New_York)

Topics

#date arithmetic#TO_DATE#SYSDATE#implicit conversion

Community Discussion

No community discussion yet for this question.

Full 1Z0-082 Practice