nerdexam
Oracle

1Z0-082 · Question #102

The EMPLOYEES table contains columns EMP_ID of data type NUMBER and HIRE_DATE of data type DATE. You want to display the date of the first Monday after the completion of six months since hiring. The…

The correct answer is B. SELECT emp_id, NEXT_DAY(ADD_MONTHS(hire_date, 6), `MONDAY') FROM employees. See the full explanation below for the reasoning.

SQL and PL/SQL

Question

The EMPLOYEES table contains columns EMP_ID of data type NUMBER and HIRE_DATE of data type DATE. You want to display the date of the first Monday after the completion of six months since hiring. The NLS_TERRITORY parameter is set to AMERICA in the session and, therefore, Sunday is the first day on the week. Which query can be used?

Options

  • ASELECT emp_id, ADD_MONTHS(hire_date, 6), NEXT_DAY(`MONDAY') FROM employees;
  • BSELECT emp_id, NEXT_DAY(ADD_MONTHS(hire_date, 6), `MONDAY') FROM employees;
  • CSELECT emp_id, NEXT_DAY(MONTHS_BETWEEN(hire_date, SYSDATE), 6) FROM
  • DSELECT emp_id, NEXT_DAY(ADD_MONTHS(hire_date, 6), 1) FROM employees;

How the community answered

(52 responses)
  • A
    10% (5)
  • B
    85% (44)
  • C
    2% (1)
  • D
    4% (2)

Topics

#ADD_MONTHS#NEXT_DAY#date functions#NLS_TERRITORY

Community Discussion

No community discussion yet for this question.

Full 1Z0-082 Practice