Home > Database > Mysql Tutorial > Does the between query in SQL include boundaries?

Does the between query in SQL include boundaries?

青灯夜游
Release: 2019-05-22 16:04:18
Original
9392 people have browsed it

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.

Does the between query in SQL include boundaries?

The following is an example to illustrate:

I have a table with only 4 rows of data:

Does the between query in SQL include boundaries?

Use between query:

Does the between query in SQL include boundaries?

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:

Does the between query in SQL include boundaries?

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!

Related labels:
sql
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template