WHERE

noun

say it: “WAIR” /wɛr/

The part of a query that keeps only the rows matching a condition.

What does WHERE do in a relational database?

WHERE — A query clause keeping only rows for which its condition is true.

SELECT order_id
FROM purchase_order
WHERE total_amount >= 100 AND status = 'open';

In a sentence

  • “I added WHERE Country = 'UK' to see only British customers.”

Level: Novice · More SQL terms at this level

Updated