This guide is specifically for MySQL syntax.
Intermediate-level SQL WHERE Clause practice exercises with solutions.
Exercise 1
Question: Find employees who are NOT in the Engineering or Marketing departments.
SELECT * FROM employees WHERE department NOT IN ('Engineering', 'Marketing');
NOT IN excludes specified values. This is cleaner than writing multiple AND conditions.
MySQL-Specific Notes
This page covers MySQL syntax. Other databases may have different syntax for similar operations.