nerdexam
Oracle

1Z0-007 · Question #34

The EMPLOYEES table contains these columns: 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…

The correct answer is C. One of the desired results. This statement will provide only one of the desired results: display the salary multiplied by the It will not exclude employees with a zero commission_pct and display a zero for employees with a null commission value. Incorrect Answers A: This statement will provide only one of…

Restricting and Sorting Data

Question

The EMPLOYEES table contains these columns: 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?

Options

  • AAll of the desired results
  • BTwo of the desired results
  • COne of the desired results
  • DAn error statement

How the community answered

(37 responses)
  • A
    5% (2)
  • B
    16% (6)
  • C
    70% (26)
  • D
    8% (3)

Explanation

This statement will provide only one of the desired results: display the salary multiplied by the It will not exclude employees with a zero commission_pct and display a zero for employees with a null commission value. Incorrect Answers A: This statement will provide only one of the desired results, not all. B: This statement will provide only one of the desired results, not two. D: This statement will not generate an error, it is correct .

Topics

#NULL handling#IS NOT NULL#NVL function#WHERE clause analysis

Community Discussion

No community discussion yet for this question.

Full 1Z0-007 Practice