nerdexam
Oracle

1Z0-061 · Question #66

View the Exhibit and evaluate the structure and data in the CUST_STATUS table. You issue the following SQL statement: Which statement is true regarding the execution of the above query?

The correct answer is C. It displays a bonus of 1000 for all customers whose AMT_SPENT equals CREDIT_LIMIT, or. The NULLIF Function The NULLIF function tests two terms for equality. If they are equal the function returns a null, else it returns the first of the two terms tested. The NULLIF function takes two mandatory parameters of any data type. The syntax is NULLIF(ifunequal…

Using Conversion Functions and Conditional Expressions

Question

View the Exhibit and evaluate the structure and data in the CUST_STATUS table. You issue the following SQL statement:

Which statement is true regarding the execution of the above query?

Exhibit

1Z0-061 question #66 exhibit

Options

  • AIt produces an error because the AMT_SPENT column contains a null value.
  • BIt displays a bonus of 1000 for all customers whose AMT_SPENT is less than CREDIT_LIMIT.
  • CIt displays a bonus of 1000 for all customers whose AMT_SPENT equals CREDIT_LIMIT, or
  • DIt produces an error because the TO_NUMBER function must be used to convert the result of

How the community answered

(27 responses)
  • A
    7% (2)
  • B
    19% (5)
  • C
    70% (19)
  • D
    4% (1)

Explanation

The NULLIF Function The NULLIF function tests two terms for equality. If they are equal the function returns a null, else it returns the first of the two terms tested. The NULLIF function takes two mandatory parameters of any data type. The syntax is NULLIF(ifunequal, comparison_term), where the parameters ifunequal and comparison_term are compared. If they are identical, then NULL is returned. If they differ, the ifunequal parameter is returned.

Topics

#CASE expression#conditional expressions#NULL handling#DECODE

Community Discussion

No community discussion yet for this question.

Full 1Z0-061 Practice