Multiple choice technology databases

Which clause would you use in a SELECT statement to limit the display to those employees whose salary is greater than 5000?

  1. ORDER BY SALARY > 5000

  2. GROUP BY SALARY > 5000

  3. HAVING SALARY > 5000

  4. WHERE SALARY > 5000

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

The WHERE clause filters rows before aggregation. To display only employees with salary > 5000, use WHERE SALARY > 5000. ORDER BY sorts, GROUP BY aggregates, HAVING filters aggregated results - none are appropriate here.