MySQL Between

MySQL Between

MySQL Between syntax and examples.

MySQL Between syntax

SELECT * FROM table_name
WHERE column BETWEEN val1 AND val2;

Table books

IDNAMEPRICE
1book120.0
2book225.0
3book315.0
4book412.0
5book518.0

Between example

SELECT * FROM books 
WHERE price BETWEEN 10 AND 15; 

Query Result

IDNAMEPRICE
3book315.0
4book412.0