Examveda
Examveda

Which of the following is illegal?

A. SELECT SYSDATE - SYSDATE FROM DUAL;

B. SELECT SYSDATE - (SYSDATE - 2) FROM DUAL;

C. SELECT SYSDATE - (SYSDATE + 2) FROM DUAL;

D. None of these

Answer: Option D

Solution(By Examveda Team)

SELECT SYSDATE - SYSDATE FROM DUAL; outputs 0
SELECT SYSDATE - (SYSDATE - 2) FROM DUAL; outputs 2
SELECT SYSDATE - (SYSDATE + 2) FROM DUAL; outputs -2


Join The Discussion

Comments ( 1 )

  1. Animesh Musicals
    Animesh Musicals :
    5 years ago

    How can a future date be subtracted from current date??

Related Questions on Sql Miscellaneous