1/*the BETWEEN operator is used to filter the result set within
2a certain range. the values can be numbers, texts or dates */
3SELECT column_name(s)
4FROM table_name
5WHERE column_name BETWEEN value1 AND value2;
1Selects values within the given range.
2Example 1: Selects stock with a quantity between 100 and 150.
3SELECT * FROM stock
4WHERE quantity BETWEEN 100 AND 150;
5Example 2: Selects stock with a quantity NOT between 100 and 150.
6Alternatively, using the NOT keyword here reverses the logic and selects
7values outside the given range.
8SELECT * FROM stock
9WHERE quantity NOT BETWEEN 100 AND 150;