AND

The AND operator tests if all conditions in a given expression evaluate to TRUE.

Syntax

SELECT column1, column2, ...
FROM table_name
WHERE condition1
  AND condition2
  ...
  AND conditionN;

If any of the condition_s evaluate to NOT TRUE, then the entire WHERE clause will not return the desired column_s.

Example

THe following example filters the current students with GPA higher than 3.0 for the rest of the students table:

SELECT *
FROM students
WHERE enrolled_status = 'current' AND overall_gpa >= 3.0

All contributors

Looking to contribute?

Learn SQL on Codecademy