SQL BETWEEN operator allows you to select a group of data in ranges of two values. These values can be numbers (integer, float),text (string) or datetime. SQL BETWEEN operator is used with SQL WHERE clause to limits the selection. Here is the syntax of using SQL BETWEEN operator:
Here is an example of using SQL BETWEEN operator to select employee which has salary between 2500 and 3000:
We use the employees as a sample table as follows: