MySQL Tutorials - Herong's Tutorial Examples - v4.40, by Dr. Herong Yang
WHERE Clause of a SELECT Statement
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
Table of Contents