BETWEEN Operator in SQL
Level 369 keystrokes
BETWEEN selects values within a range, inclusive of both endpoints.
SQL code
1SELECT -- Returns the name and price columns2 name,3 price4FROM5 products6WHERE -- BETWEEN is inclusive: 10.00 and 50.00 themselves match -- Same as price >= 10.00 AND price <= 50.007 price BETWEEN 10.00 AND 50.00;Output
+---------+-------+ | name | price | +---------+-------+ | Widget | 15.00 | | Gadget | 25.00 | | Tool | 45.00 | +---------+-------+ 3 rows in set
Practice typing this code. Results are not recorded in the rankings.
Symbols in this code
The symbols you type in this SQL code and how often they appear.
.× 2,× 1;× 1