nerdexam
Oracle

1Z0-144 · Question #55

View the Exhibit to examine the PL/SQL code: SREVROUPUT is on for the session. Which statement Is true about the output of the PL/SQL block?

The correct answer is D. The output Is Can't tell if x and y are equal or not. y NUMBER := NULL; IF x != y THEN - yields NULL, not TRUE DBMS_OUTPUT.PUT_LINE('x != y'); - not run ELSIF x = y THEN - also yields NULL DBMS_OUTPUT.PUT_LINE('x = y'); DBMS_OUTPUT.PUT_LINE ('Can"t tell if x and y are equal or not.'); Can't tell if x and y are equal or not.

Declaring PL/SQL Variables

Question

View the Exhibit to examine the PL/SQL code:

SREVROUPUT is on for the session. Which statement Is true about the output of the PL/SQL block?

Exhibit

1Z0-144 question #55 exhibit

Options

  • AThe output is x = y.
  • BIt produces an error.
  • CThe output Is x != y.
  • DThe output Is Can't tell if x and y are equal or not.

How the community answered

(48 responses)
  • A
    4% (2)
  • B
    6% (3)
  • C
    15% (7)
  • D
    75% (36)

Explanation

y NUMBER := NULL; IF x != y THEN - yields NULL, not TRUE DBMS_OUTPUT.PUT_LINE('x != y'); - not run ELSIF x = y THEN - also yields NULL DBMS_OUTPUT.PUT_LINE('x = y'); DBMS_OUTPUT.PUT_LINE ('Can"t tell if x and y are equal or not.'); Can't tell if x and y are equal or not.

Topics

#NULL comparison#boolean logic#variable comparison#DBMS_OUTPUT

Community Discussion

No community discussion yet for this question.

Full 1Z0-144 Practice