exam questions

Exam 1z0-061 All Questions

View all questions & answers for the 1z0-061 exam

Exam 1z0-061 topic 1 question 14 discussion

Actual exam question from Oracle's 1z0-061
Question #: 14
Topic #: 1
[All 1z0-061 Questions]

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?

  • A. It produces an error because the AMT_SPENT column contains a null value.
  • B. It displays a bonus of 1000 for all customers whose AMT_SPENT is less than CREDIT_LIMIT.
  • C. It displays a bonus of 1000 for all customers whose AMT_SPENT equals CREDIT_LIMIT, or AMT_SPENT is null.
  • D. It produces an error because the TO_NUMBER function must be used to convert the result of the NULLIF function before it can be used by the NVL2 function.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️
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.

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Blob44
2 years, 2 months ago
Correct answer is C NVL2 (expr1,expr2,expr3) lets you determine the value returned by a query based on whether a specified expression is null or not null. If expr1 is not null, then NVL2 returns expr2. If expr1 is null, then NVL2 returns expr3.
upvoted 2 times
...
Oca_fidele
4 years, 9 months ago
Correct answer is A
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago