# BETWEEN, NOT BETWEEN

`BETWEEN` and `NOT BETWEEN` check if values are in or not in a range that includes the two endpoints (inclusive). For example:

```sql
CREATE TABLE bet_r(t TEXT);
INSERT bet_r VALUES("blue"), ("orange"), ("yellow");

```

```sql
SELECT * FROM bet_r WHERE t BETWEEN "blue" AND "pink";

```

```output

+--------+
| t      |
+--------+
| blue   |
| orange |
+--------+
```

***

Modified at: January 9, 2024

Source: [/db/v9.1/reference/sql-reference/comparison-operators-and-functions/between-not-between/](https://docs.singlestore.com/db/v9.1/reference/sql-reference/comparison-operators-and-functions/between-not-between/)

(An index of the documentation is available at /llms.txt)
