# Quiz: Null Functions

Test: Quiz: Null Functions

Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.

Section 1

1. With the following data in Employees (last_name, commission_pct, manager_id) what is the result of the following statement?

DATA:

King,null,null

Kochhar, null,100

Vargas, null, 124

Zlotkey,.2, 100

SELECT last_name, NVL2(commission_pct, manager_id, -1) comm

FROM employees ;

Mark for Review

(1) Points

King, -1

Kochhar, -1

Vargas, -1

Zlotkey, .2

Statement will fail.

King, -1

Kochhar, 100

Vargas, 124

Zlotkey, .2

King, -1

Kochhar, -1

Vargas, -1

Zlotkey, 100(*)

2. The following statement returns 0 (zero). True or False?

SELECT 121/NULL

FROM dual;

Mark for Review

(1) Points

True

False (*)

3. Which function compares two expressions? Mark for Review

(1) Points

NVL

NULLIF (*)

NVL2

NULL

4. If quantity is a number datatype, what is the result of this statement?

SELECT NVL(200/quantity, 'zero') FROM inventory;

Mark for Review

(1) Points

zero

ZERO

The statement fails (*)

Null

5. Consider the following data in the Employees table:

(last_name, commission_pct, manager_id)

DATA:

King,null,null

Kochhar, null,100

Vargas, null, 124

Zlotkey,.2, 100

What is the result of the following statement:

SELECT last_name, COALESCE(commission_pct, manager_id, -1) comm

FROM employees ;

Mark for Review

(1) Points

Statement will fail

King, -1

Kochhar, 100

Vargas, 124

Zlotkey, .2(*)

King, -1

Kochhar, 100

Vargas, 124

Zlotkey, 100

King, null

Kochhar, 100

Vargas, 124

Zlotkey, .2

Solution for Test: Quiz: Introduction to The Oracle Academy
Solution for Test: Quiz: Data vs Information
Top