Tag Archives: where clause

Between operator in SQL Query

Between Operator in SQL Query

Between operator is used to fetch data in specific range of value in one Statement instead of using greater than and equal to operator multiple time. It better to understand during reading and less mistake chance for user in defining range value.


SELECT columnname FROM tablename WHERE columnname BETWEEN value1 AND value2;

Find the value in the particular range from the table Employee having salary range inbetween 10000 to 20000.

select * from employee where salary between 10000 and 20000;

Find all the employee whose salary not in between 10000 to 20000

select * from employee where salary not between 10000 and 20000;

Find data range with between clause.
Find employees details how is joining inbetween 1-Aug-2000 to 31-Dec-2000.

select * from employees where joining_date between '1-AUG-2000' and '31-DEC-2000';