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
| Query | Includes 14? |
|---|---|
age < 14 | No |
age <= 14 | Yes |
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;