Which SQL statement returns a numeric value?
A.
SELECT ADD_MONTHS(MAX(hire_Date), 6)
FROM EMP;
B.
SELECT ROUND(hire_date)
FROM EMP;
C.
SELECT sysdate-hire_date
FROM EMP;
D.
SELECT TO_NUMBER(hire_date + 7)
FROM EMP;
Explanation:
DATE value subtract DATE value will return numeric value.
Incorrect answer:
A:
does not return numeric value
B:
does not return numeric value
D:
does not return numeric value
Refer: Introduction to Oracle9i: SQL, Oracle University Study Guide, 9-13
C