Skip
Arish's avatar

15. Less Than or Equal To


Less Than or Equal To

The <= operator includes the boundary value.

Syntax

sql
1SELECT * FROM students WHERE age <= 14;

Example

Find students aged 14 or younger:

sql
1SELECT * FROM students
2WHERE age <= 14;

This includes students who are exactly 14.

Comparison

QueryIncludes 14?
age < 14No
age <= 14Yes

More Examples

sql
1-- Marks up to 80 (including 80)
2SELECT * FROM students WHERE marks <= 80;
3
4-- Age 13 or below
5SELECT * FROM students WHERE age <= 13;