Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
See the whole table
Select some columns
Filtering rows
10. Logical operators – AND
Text patterns
To be or NULL to be
A little bit of mathematics
Let's practice


Excellent! Of course, OR isn't the only logical operator out there. Take a look at the next example:

SELECT id, name
FROM user
WHERE age <= 70
  AND age >= 13;

AND is another logical operator.

In this case, only those users will be selected whose age is 13 or above and 70 or below. In other words, both conditions must be fulfilled to retrieve a particular row.


Select vins of all cars which were produced after 1999 and are cheaper than $7,000.

Stuck? Here's a hint!


FROM car
WHERE production_year > 1999
  AND price < 7000;