This operator is used in SQL whenever it is needed to prove if certain value belongs to some range. This operator is used together with “AND” command which defines given range. Operator can be used in most of the clauses but is most common in WHERE for defining limiting requirement.
SQL BETWEEN Operator Syntax
SELECT [Date]
FROM [dbo].[Table]
WHERE [Date] BETWEEN '1900-01-01' AND '2050-12-31';
Condition can be obviously defined not only by date fields but even above any data type (where it makes sense) – numeral data types, text data types etc. Boundaries of the interval are included in the requirement with this operator.
Between can be used even in negative limitation, we would use NOT BETWEEN.
T-Sql query (as in Syntax above) is equal to query below:
SELECT [Date]
FROM [dbo].[Table]
WHERE [Date] >= '1900-01-01' AND [Date] <= '2050-12-31';
BETWEEN is more elegant, shorter and makes your code clearer at a first glance. More on this operator can be accessed via this link