Multiple choice

The EMP table contains the following columns: EMPNO NUMBER(6)

HIREDATE DATE

Review the following SELECT statement:

SELECT empno, TO_DATE('31-DEC-05') - hiredate

FROM emp

WHERE hiredate BETWEEN '31-DEC-04' AND '31-DEC-05';

What are the results of this statement?

  1. Only numeric values are returned.

  2. The employee numbers of any employees hired on January 1, 2004 are displayed.

  3. Date and numeric values are returned.

  4. The employee numbers of all employees hired before the year 2000 are displayed.

  5. Only the employee numbers of all employees are displayed because the BETWEEN operator used in the WHERE clause condition is a number function.

Reveal answer Fill a bubble to check yourself
A Correct answer