Tsallaka zuwa abun ciki
Justice Tech School

BETWEEN

BETWEEN checks a range and includes both ends. It works with numbers, text and dates.

Example
SELECT name, score
FROM students
WHERE score BETWEEN 70 AND 85
ORDER BY score;

Result

name  | score
Tunde | 71
Kofi  | 78
Amina | 85
Example
SELECT name, joined
FROM students
WHERE joined BETWEEN '2026-02-01' AND '2026-02-28';

Result

name    | joined
Amina   | 2026-02-03
Wanjiru | 2026-02-14

Exercise

Check a score from 70 to 90.

SELECT * FROM students WHERE score  70 AND 90;

Quiz Test

Does BETWEEN 70 AND 85 include 85?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.