Beginner

171. Less Than or Equal To

Learn how to filter values that are less than or equal to a specified value.

📘 Lesson 171 of 728 ⏱ 7 min 🎯 Beginner

The less-than-or-equal operator (<=) returns rows where a value is either less than or exactly equal to the comparison value.

Many business rules define a maximum allowed value, making <= useful for accurate filtering.

Find products priced at or below ₹1,000.

SQL
SELECT
    ProductName,
    Price
FROM Products
WHERE Price <= 1000;

It is useful for budget limits, maximum transaction values, inventory thresholds, age criteria, and pricing analysis.

  • <= means less than or equal to.
  • It includes the boundary value.
  • It is commonly used with numeric values.
  • It can be used with dates and other ordered values.
  • It is useful for maximum thresholds.
What does <= mean in SQL?

It returns values that are less than or equal to the specified comparison value.

Does Price <= 1000 include 1000?

Yes. The less-than-or-equal operator includes the boundary value.

Have you finished this lesson?

Introduction to SQL – All Lessons