What does the statement provide?

The EMPLOYEES table contains these columns:
LAST_NAME VARCHAR2 (25)
SALARY NUMBER (6,2)
COMMISSION_PCT NUMBER (6)
You need to write a query that will produce these results:
1. Display the salary multiplied by the commission_pct.
2. Exclude employees with a zero commission_pct.
3. Display a zero for employees with a null commission value.
Evaluate the SQL statement:
SELECT LAST_NAME, SALARY*COMMISSION_PCT
FROM EMPLOYEES
WHERE COMMISSION_PCT IS NOT NULL;
What does the statement provide?

The EMPLOYEES table contains these columns:
LAST_NAME VARCHAR2 (25)
SALARY NUMBER (6,2)
COMMISSION_PCT NUMBER (6)
You need to write a query that will produce these results:
1. Display the salary multiplied by the commission_pct.
2. Exclude employees with a zero commission_pct.
3. Display a zero for employees with a null commission value.
Evaluate the SQL statement:
SELECT LAST_NAME, SALARY*COMMISSION_PCT
FROM EMPLOYEES
WHERE COMMISSION_PCT IS NOT NULL;
What does the statement provide?

A.
one of the desired results

B.
an error statement

C.
two of the desired results

D.
all of the desired results

Explanation:

This statement will provide only one of the desired results: display the salary multiplied by the
commission_pct. It will not exclude employees with a zero commission_pct and display a zero for

employees with a null commission value.
OCP Introduction to Oracle 9i: SQL Exam Guide, Jason Couchman, p. 25-38
Chapter 1: Overview of Oracle Databases



Leave a Reply 1

Your email address will not be published. Required fields are marked *