Home >Database >Mysql Tutorial >Does the between query in SQL include boundaries?
In sql, the between operator is used to query a certain range of values. These values can be numbers, text or dates. So does the range that the between operator can query include boundaries? The following article will introduce it to you, I hope it will be helpful to you.
The following is an example to illustrate:
I have a table with only 4 rows of data:
Use between query:
It can be seen that using between query includes the front and rear boundary values.
If you want to display people outside the range, you need to use it with the NOT operator and use not between
to query, for example:
The above is the detailed content of Does the between query in SQL include boundaries?. For more information, please follow other related articles on the PHP Chinese website!