Multiple choice

Examine the code given below:

SELECT employee_id FROM employees WHERE commission_pct=.5 OR salary > 23000

Which of the following statements is correct with regard to this code?

  1. It returns employees who have 50% of the salary greater than $23,000.
  2. It returns employees who have 50% commission rate or salary greater than $23,000.
  3. It returns employees who have 50% of salary less than $23,000.
  4. None of the above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The query selects employees with either a 50% commission rate (commission_pct = 0.5) OR a salary exceeding 23,000. The OR condition means employees meeting EITHER criterion are returned. Option A incorrectly interprets it as a percentage calculation, and Option C misreads the comparison direction. This is a straightforward OR condition combining two independent filters.