AND

SQL AND Keyword

The AND keyword in SQL is used in the WHERE clause to filter records based on multiple conditions. It returns only the rows where all conditions are true.

Tutorials dojo strip

SQL AND Syntax

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

SQL AND Example with Patients Table

This query selects all patients whose gender is 'F' and who were born after '1990-01-01. This query returns only the records where both conditions are true: the patient must be female (gender = 'F') and must have a date of birth later than January 1, 1990 (dob > '1990-01-01').

SELECT * FROM Patients
WHERE gender = 'F' AND dob > '1990-01-01';

SQL AND Labs

Tutorials dojo strip
Tutorials dojo strip
Scroll to Top