Oracle Database SQL — Question 186

You need to calculate the number of days from 1st January 2019 until today.

Dates are stored in the default format of DD-MON-RR.

Which two queries give the required output? (Choose two.)

Answer options

Correct answer: C, E

Explanation

The queries in options C and E correctly calculate the number of days between SYSDATE and '01-JANUARY-2019' using valid date functions. Option A is incorrect as it attempts to subtract a string from a date format, and option B is also invalid since it uses a string instead of a date type for the comparison. Option D has the same issue as option A with incorrect date formatting.