WHERE clause filters out just the rows you actually want from your data. It's a concept you'll use almost constantly in search, filtering, admin reports, and user dashboards.
Comparison operators
• = equal to
• != or <> not equal to
• >, <, >=, <= for greater than / less than comparisons
Things to watch out for
Put text values in quotes, for example Country = 'Mexico'.
sql
SELECT CustomerName, Country
FROM Customers
WHERE Country = 'Mexico';You should see
+----------------+---------+ | CustomerName | Country | +----------------+---------+ | Ana Trujillo | Mexico | | Antonio Moreno | Mexico | +----------------+---------+ What learners should notice: There are 4 customers in the table, but only the 2 Mexico customers match the condition and show up. Practical use: On an ecommerce site, you could use WHERE category = 'Laptop' to show only laptop products.