Inclusiveness of SQL – BETWEEN operator

Published by


Both parameters passed to the BETWEEN operator in SQL are inclusive to it.

e.g. SELECT * FROM Employees WHERE Age BETWEEN 20 and 30;

The above SQL returns all the records from the table – Employees where the age is >= 20 and <= 30. Here the employee records whose age is either 20 or 30 are also retrieved. See the below.

BETWEEN Operator in SQL
BETWEEN Operator in SQL

Happy time until my next blog post.. 🙂

Leave a Reply