1Z0-061 · Question #161
See the Exhibit and examine the structure of the PROMOSTIONS table: Which SQL statements are valid? (Choose all that apply.)
The correct answer is A. SELECT promo_id, DECODE(NVL(promo_cost, 0), promo_cost, B. SELECT promo_id, DECODE(promo_cost, 10000. The DECODE Function Although its name sounds mysterious, this function is straightforward. The DECODE function implements ifthen-else conditional logic by testing its first two terms for equality and returns the third if they are equal and optionally returns another term if…
Question
See the Exhibit and examine the structure of the PROMOSTIONS table:
Which SQL statements are valid? (Choose all that apply.)
Exhibit
Options
- ASELECT promo_id, DECODE(NVL(promo_cost, 0), promo_cost,
- BSELECT promo_id, DECODE(promo_cost, 10000,
- CSELECT promo_id, DECODE(NULLIF(promo_cost, 10000),
- DSELECT promo_id, DECODE(promo_cost, >10000, 'High',
How the community answered
(29 responses)- A86% (25)
- C10% (3)
- D3% (1)
Explanation
The DECODE Function Although its name sounds mysterious, this function is straightforward. The DECODE function implements ifthen-else conditional logic by testing its first two terms for equality and returns the third if they are equal and optionally returns another term if they are not. The DECODE function takes at least three mandatory parameters, but can take many more. The syntax of the function is DECODE(expr1, comp1, iftrue1, [comp2, iftrue2...[ compN, iftrueN]], [iffalse]).
Topics
Community Discussion
No community discussion yet for this question.
