MySQL Tutorials - Herong's Tutorial Examples - Version 4.20, by Dr. Herong Yang
WHERE Clause of a SELECT Statement
This section provides tutorial examples on how to use the WHERE clause to filter rows out of the base table in a SELECT statement.
As I mentioned earlier, the WHERE clause modifies the base table by filtering out rows of data that do not satisfy the specified conditions. Here is its syntax:
where "where_condition" is a predicate operation that will result a true or false condition.
WHERE clause samples:
WHERE Salary <= 45000.00 WHERE Salary > 45000.00 AND Salary <= 65000.00 WHERE Dept IN ('Math','Chem') WHERE (Dept = 'Math' OR Dept = 'Chem') AND Salary <= 45000.00 WHERE User.Dept_ID = Dept.ID
Last update: 2015.
Table of Contents