Oracle Database SQL — Question 56
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 a number.
- C. PROMO_BEGIN_DATE – SYSDATE will return an error.
- D. PROMO_BEGIN_DATE – 5 will return a date.
- E. TO_DATE(PROMO_BEGIN_DATE * 5) will return a date.
Correct answer: B, D
Explanation
Statement B is correct because subtracting SYSDATE from a DATE type results in a number representing the difference in days. Statement D is also accurate, as subtracting a number from a DATE type will return another DATE. The other statements are incorrect due to type mismatches or incorrect operations involving DATE values.