Oracle Database SQL — Question 123
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. invoice_date = '15-march-2019' : uses implicit conversion
- B. qty_sold BETWEEN '101' AND '110' : uses implicit conversion
- C. invoice_date > '01-02-2019' : uses implicit conversion
- D. qty_sold = '0554982' : requires explicit conversion
- E. CONCAT (qty_sold, invoice_date) : requires explicit conversion
Correct answer: A, B
Explanation
Option A is correct because the string '15-MAR-2019' can be implicitly converted to a DATE. Option B is also correct since the strings '101' and '110' can be implicitly converted to NUMBER. The other options require explicit conversion due to discrepancies between data types.