Home / CSE / SQL Basics :: Discussion

Discussion :: SQL Basics

  1. Which of the following is illegal?

  2. A.

     SELECT SYSDATE - SYSDATE FROM DUAL;

    B.

     SELECT SYSDATE - (SYSDATE - 2) FROM DUAL;

    C.

     SELECT SYSDATE - (SYSDATE + 2) FROM DUAL;

    D.

     None of these

    View Answer

    Workspace

    Answer : Option D

    Explanation :

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


Be The First To Comment