The MySQL WHERE clause filters records so that only rows matching specified logical conditions are returned.
=, !=, <>, >, <, >=, <=BETWEEN, IN, NOT INLIKE, REGEXPIS NULL, IS NOT NULL-- Query products priced greater than $50.00
SELECT product_name, price, category
FROM products
WHERE price > 50.00 AND status = 'ACTIVE';
| product_name | price | category |
|---|---|---|
| Wireless Headphones | 89.99 | Electronics |
| Standing Desk | 299.50 | Furniture |
WHERE YEAR(created_at) = 2026) because it prevents index usage. Use date ranges instead (WHERE created_at >= '2026-01-01').WHERE column = NULL. Always use WHERE column IS NULL.What is the correct SQL syntax to check if a column value is missing or NULL?
Sign in to track your learning journey, earn industry-recognized certificates, and join our elite developer community.
Quick Access With