nerdexam
Oracle

1Z0-074 · Question #91

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?

The correct answer is A. SELECT TO_CHAR(SYSDATE, `DD-MON-YYYY') ?'01-JAN-2019' FROM DUAL. See the full explanation below for the reasoning.

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?

Options

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

How the community answered

(40 responses)
  • A
    80% (32)
  • B
    3% (1)
  • C
    5% (2)
  • D
    13% (5)

Community Discussion

No community discussion yet for this question.

Full 1Z0-074 Practice