The WHERE clause allows you to specify a search condition for the rows returned by a query.

SELECT 
    select_list
FROM
    table_name
WHERE
    search_condition;
  • We use it with SELECT, UPDATE, DELETE

  • The search_condition is a combination of one or more expressions using the Logical Operators.

  • In MySQL, a predicate is a Boolean expression that evaluates to TRUEFALSE, or UNKNOWN.

  • The SELECT statement will include any row that satisfies the search_condition in the result set.

  • When executing a SELECT FROM statement with a WHERE clause, MySQL evaluates the WHERE clause after the FROM clause and before the SELECT and ORDER BY clauses: