1z0-071 Exam QuestionsBrowse all questions from this exam

1z0-071 Exam - Question 60


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.)

Show Answer
Correct Answer: AB

When considering data type conversions in query expressions, implicit conversions happen automatically without explicit cast functions, whereas explicit conversions require the use of functions like TO_DATE or TO_NUMBER. For the given options, 'invoice_date = '15-march-2019'' uses implicit conversion as Oracle automatically converts the string '15-march-2019' to a DATE type because it matches the DD-MON-RR format. Similarly, 'qty_sold BETWEEN '101' AND '110'' uses implicit conversion since Oracle can implicitly treat string literals '101' and '110' as numbers in the context of a numeric comparison. Therefore, both options A and B involve implicit data type conversions.

Discussion

6 comments
Sign in to comment
NennuzzoOptions: AB
Dec 16, 2023

AB are correct, I tested it.

ArslanAltaf
Jun 15, 2024

ABC are correct

MooonLight
Apr 20, 2023

Can anyone please explain the correct answers? not quite getting the sense... thank you.

kuff
May 3, 2023

A. Implicit conversion can be done as string matches the NSL_DATE_FORMAT. B. Implicit conversion to number C. Can't use implicit conversion as string doesn't match NSL_DATE_FORMAT D. Doesn't require explicit conversion E. Doesn't require explicit conversion

lucemqy
Nov 14, 2023

but the month is spelled out isn't MON the three letter abbreviation of the month?

Monesha_GanesanOptions: CD
Dec 14, 2023

C. invoice_date > '01-02-2019': This statement uses implicit conversion. The date string is implicitly converted to a DATE type using the default date format. D. qty_sold = '0554982': This statement requires explicit conversion. You need to explicitly convert the string to a NUMBER to compare it with the QTY_SOLD column.

799f3be
Apr 18, 2024

why is E wrong?

a947739
Jun 27, 2024

SELECT CONCAT(sal,hiredate) from emp; try this , it doesn't need explicit conversion

Bertrand_dokOptions: BE
Jun 9, 2024

A and C can't work because it doesn't match the NLS date format, D works fine by implicit conversion , so it's BE

yanoolthecool
Jun 13, 2024

E says 'explicit' did you see any conversion function? A works, as MON is for the full month name and RR.. just google it.