The WHERE Clause
Renée M. P. Teate · 2021
The WHERE clause is the part of the SELECT statement in which the readers list conditions that are used to determine which rows in the table should be included in the results set. In other words, the WHERE clause is used for filtering. Structured Query Language uses boolean logic to check the available data against conditions in WHERE clause to determine whether to include each row in the output. The readers can combine multiple conditions with boolean operators, such as “AND,” “OR,” or “AND NOT” between them in order to filter using multiple criteria in the WHERE clause. The filters include numeric, string, and date comparisons to determine if a value in a field is greater than, less than, or equal to a given comparison value. The chapter uses the list of dates generated by that query to return purchases made on those dates.