BETWEEN

Select a range of values BETWEEN two specified field values:

mysql> select * from Students where Score BETWEEN 40 and 60;
+----+-------+---------+-----+------+------+-------+-------+
| id | First | Surname | Age | Town | PIN  | Study | Score |
+----+-------+---------+-----+------+------+-------+-------+
| 6  | Phil  | Watson  | 36  | Hook | 9437 | Cars  | 44    |
| 7  | Terry | Waite   | 58  | Manc | 2643 | Music | 59    |
+----+-------+---------+-----+------+------+-------+-------+
2 rows in set (0.00 sec)

 

Can also be negated using NOT

Leave a Reply