posted 17 years ago
A family of 4 contains 2 sons who are born the following dates respectively February 1,2000 and April 18,2004
Assumption: Assume the DB is oracle and none of the default DB settings have been altered.
Which of the following queries will give us the exact number of days between the birth dates of the 2 sons?
1) select '01-02-2000'-'18/05/2004' from dual
2)select to_date('01-FEB-2000')-to_date('18-APR-2004') from dual
3)select to_date('01-FEB-2000','DD-MMM-YYYY')-to_date('18-APR-2004','DD-MMM-YYYY') from dual