QuestionQ204

VerifiedUsing Conversion Functions and Conditional Expressions

Review the description of the EMPLOYEES table:

Question Image

NLS_DATE_FORMAT is set to DD-MON-YY.

Which query needs explicit data type conversion?

Explanation

A character date value in the form 10-02-2018 does not match the session DD-MON-YY date format. Comparing it with a DATE value therefore requires an explicit conversion, such as TO_DATE('10-02-2018', 'DD-MM-YYYY'), or an ANSI date literal. Oracle uses NLS_DATE_FORMAT for implicit character-to-date conversion in date expressions.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!