MySQL Tutorial

A database system used with PHP.

MySQL BETWEEN

The MySQL BETWEEN Operator

The BETWEEN operator selects values within a given range. The values can be numbers, text, or dates.

The BETWEEN operator is inclusive: begin and end values are included.

Syntax:

SELECT column_name(s)
FROM table_name
WHERE column_name BETWEEN value1 AND value2;

Try It Yourself

Edit the code below and click Run to see the result live.

Source Code
Result
Topics