nerdexam
Oracle

1Z0-071 · Question #211

The PRODUCTS table has the following structure. Evaluate the following two SQL statements: SQL>SELECT prod_id, NVL2 (prod_expiry_date, prod_expiry_date + 15, ' ') FROM products; SQL>SELECT prod_id…

The correct answer is A. Both the statements execute and give different results. See the full explanation below for the reasoning.

Question

The PRODUCTS table has the following structure. Evaluate the following two SQL statements:

SQL>SELECT prod_id, NVL2 (prod_expiry_date, prod_expiry_date + 15, ‘ ‘) FROM products; SQL>SELECT prod_id, NVL (prod_expiry_date, prod_expiry_date + 15) FROM products; Which statement is true regarding the outcome?

Options

  • ABoth the statements execute and give different results
  • BOnly the second SQL statement executes successfully
  • CBoth the statements execute and give the same result
  • DOnly the first SQL statement executes successfully

How the community answered

(31 responses)
  • A
    84% (26)
  • B
    3% (1)
  • C
    10% (3)
  • D
    3% (1)

Community Discussion

No community discussion yet for this question.

Full 1Z0-071 Practice