Exam 1z0-071 All QuestionsBrowse all questions from this exam
Question 195

Which two queries execute successfully? (Choose two.)

    Correct Answer: C, D

    The queries that execute successfully are 'SELECT NULLIF (100, 100) FROM DUAL;' and 'SELECT COALESCE (100, NULL, 200) FROM DUAL;'. The first query works because both arguments in the NULLIF function are valid and of compatible types, and the function checks if both arguments are equal. The second query uses COALESCE, which returns the first non-null value from the list of arguments, so it also executes without issues. Options involving incompatible data types or the literal NULL in the wrong position for the NULLIF function do not execute successfully.

Discussion
jfc1Options: CD

A is not valid The correct answer is CD

yaya32Options: CD

CD is correct

IzzicertificacionOptions: CD

CD ES CORRECTO YA ESTA VALIDADO

lucemqyOptions: CD

CD is correct NULLIF can't have NULL in the first expression

DarnunOptions: CD

CD. For NULLIF you cannot specify the literal NULL for expr1 (1st parameter).