Inclusiveness of SQL – BETWEEN operator


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.. 🙂

Your valuable comments are highly honoured..!!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Up ↑