What is the use of between in mysql
Xiaobian to share with you what is the use of between in mysql, I believe most people do not know how, so share this article for everyone's reference, I hope you have a lot of harvest after reading this article, let's go to understand it together!
Range queries with BETWEEN AND in MySQL data tables
The BETWEEN AND keyword determines whether the value of a field is within a specified range.
If the value of the field is within the specified range, the query condition is met and the record will be queried.
If the value of the field is not within the specified range, the query criteria are not met.
The basic syntax is as follows:
[NOT]BETWEEN 1 AND 2
NOT: Optional. Add NOT to indicate that the specified range of conditions cannot be satisfied.
Value 1: Indicates the starting value of the range.
Value 2: Indicates the end value of the range.
Note:
The boundary is as follows: between... prar1 and prar2 are equivalent to>=prar1 and