# Bruce 的玩具間

## MySQL 的 between 會不會包含開頭跟結尾本身？答：會

### TL;DR

MySQL 的 between 會包含開頭跟結尾本身，也就是 column >= lower_limit and column <= upper_limit

### 為什麼要寫這篇

Notice that the BETWEEN operator can produce different result in different databases!
In some databases, BETWEEN selects fields that are between and excluding the test values.
In other databases, BETWEEN selects fields that are between and including the test values.
And in other databases, BETWEEN selects fields between the test values, including the first test value and excluding the last test value.

Therefore: Check how your database treats the BETWEEN operator!