Oracle Database Administration I — Question 102
In the promotions table, the PROMO_BEGIN_DATE column is of data type DATE and the default date format is DD-MON-RR.
Which two statements are true about expressions using PROMO_BEGIN_DATE contained in a query? (Choose two.)
Answer options
- A. TO_NUMBER(PROMO_BEGIN_DATE) - 5 will return a number.
- B. PROMO_BEGIN_DATE - SYSDATE will return an error.
- C. PROMO_BEGIN_DATE - SYSDATE will return a number.
- D. PROMO_BEGIN_DATE - 5 will return a date.
- E. TO_DATE(PROMO_BEGIN_DATE * 5) will return a date.
Correct answer: C, D
Explanation
Option C is correct because subtracting SYSDATE from a DATE type yields a number representing the difference in days. Option D is also correct since subtracting a number from a DATE results in another DATE. Options A, B, and E are incorrect, as they either involve invalid operations or incorrect assumptions about data types.