exam questions

Exam 1z0-061 All Questions

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

Exam 1z0-061 topic 4 question 65 discussion

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

Examine the data in the LIST_PRICE and MIN_PRICE columns of the PRODUCTS table:

Which two expressions give the same output? (Choose two.)

  • A. NVL(NULLIF(list_price, min_price), 0)
  • B. NVL(COALESCE(list_price, min_price), 0)
  • C. NVL2(COALESCE(list_price, min_price), min_price, 0)
  • D. COALESCE(NVL2(list_price, list_price, min_price), 0)
Show Suggested Answer Hide Answer
Suggested Answer: BD 🗳️
Using the COALESCE Function -
The advantage of the COALESCE function over the NVL function is that the COALESCE function can take multiple alternate values.
If the first expression is not null, the COALESCE function returns that expression; otherwise, it does a COALESCE of the remaining expressions.
Using the COALESCE Function -
The COALESCE function returns the first non-null expression in the list.

Syntax -
COALESCE (expr1, expr2, .. exprn)
In the syntax:
expr1 returns this expression if it is not null
expr2 returns this expression if the first expression is null and this expression is not null
exprn returns this expression if the preceding expressions are null
Note that all expressions must be of the same data type.

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
winston
1 year, 5 months ago
VER VAGUE QUESTION EVEN 1 AND C ARE CORRECT DEPENDS ON THE INTERPRETATION OF THE QUESTION
upvoted 1 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