What is a Search Condition?
Go Up to Restricting Row Retrieval with WHERE
Because the WHERE clause specifies the type of data a query is searching for it is often called a search condition. A query examines each row in a table to see if it meets the criteria specified in the search condition. If it does, the row qualifies for retrieval.
When a row is compared to a search condition, one of three values is returned:
- True: A row meets the conditions specified in the
WHEREclause. - False: A row fails to meet the conditions specified in the
WHEREclause. - Unknown: A column tested in the
WHEREclause contains an unknown value that could not be evaluated because of aNULLcomparison.
Most search conditions, no matter how complex, evaluate to True or False. An expression that evaluates to True or False—like the search condition in the WHERE clause—is called a boolean expression.