Oracle Database Administration I — Question 75
The INVOICE table has a QTY_SOLD column of data type NUMBER and an INVOICE_DATE column of data type DATE.
NLS_DATE_FORMAT is set to DD-MON-RR.
Which two are true about data type conversions involving these columns in query expressions? (Choose two.)
Answer options
- A. CONCAT (qty_sold, invoice_date) : requires explicit conversion
- B. invoice_date = '15-march-2019' : uses implicit conversion
- C. invoie_date > '01-02-2019' : uses implicit conversion
- D. qty_sold BETWEEN '101' AND '110' : uses implicit conversion
- E. qty_sold = '0554982' uses implicit conversion
Correct answer: B, D
Explanation
Option B is correct because Oracle automatically converts the string '15-march-2019' to a DATE type for comparison with the INVOICE_DATE column. Option D is also correct since the BETWEEN clause allows for implicit conversion of the string literals to the NUMBER type for comparison with the QTY_SOLD column. The other options either require explicit conversion or do not utilize implicit conversion correctly.