​​​​SQL Less Than or Equal To Comparison Operator

The SQL Less Than Or Equal To comparison operator (<=) is used to compare two values.  It returns TRUE if the first value is less than the second.  If the second is less, it returns FALSE. 

You can also test for Less than by using <.  

Here are a couple of examples: 

10 <=5FALSE
5 <= 20TRUE
10 <= 10TRUE
SELECT ProductNumber, Name, ListPrice FROM Production.Product WHERE ListPrice <= 100 ORDER BY ListPrice Desc
SELECT ProductNumber, Name, ListPrice
FROM   Production.Product
WHERE  ListPrice <= 100
ORDER BY ListPrice Desc

SQL Less Than or Equal To with Other Types 

You can use the Less than or Equal to comparison with other data type, such as String and DateTime

Here we’re returning products modified before February 15th, 2014. 

SELECT ProductNumber, Name, ListPrice, ModifiedDate FROM Production.Product WHERE ModifiedDate <= '2014-02-15'
SELECT ProductNumber, Name, ListPrice, ModifiedDate
FROM   Production.Product
WHERE  ModifiedDate <= '2014-02-15' 

Additional Resources 

To learn more about SQL Less than (<), check out these useful resources: 

Are you ready to learn SQL Server, but don't know where to start?

>