Multiple choice

Which of the following increments the time component of the sysdate by one second?

  1. SELECT SYSDATE+1 FROM DUAL

  2. SELECT TO_CHAR(SYSDATE+1,'MM/dd/yyyy HH:mm:ss') FROM DUAL

  3. SELECT SYSDATE+1/86400 FROM DUAL

  4. SELECT (SYSDATE+1)/86400 FROM DUAL

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

This answer is correct. SYSDATE+1 will give the next date and time component. But SYSDATE+1/86400 will give the next second of the current date and current hour and current minute because in a given day, there are 86400 seconds, i.e. 24 * 60 * 60 seconds. Hence 1/86400 will give you the current second. When the sysdate is added to 1/86400, it gives the next second of the current date, hour and minute.