What is a Search Condition?

From InterBase
Jump to: navigation, search

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 WHERE clause.
  • False: A row fails to meet the conditions specified in the WHERE clause.
  • Unknown: A column tested in the WHERE clause contains an unknown value that could not be evaluated because of a NULL comparison.

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.