- 1
BETWEEN clause SQL ... example says 'WHERE ID BETWEEN 3 AND 7' but results include 3 and 7, is this correct?
I would have expected the results to exclude the lower bound and the upper bound as we are asking for results between these (from from and to). I'm not sure if the example is wrong or if this is how SQL works?
2 Réponses
+ 1
Quoted from w3schools:
"The BETWEEN operator is inclusive:begin and end values are included."
https://www.w3schools.com/sql/sql_between.asp
Hth, cmiiw
0
Between statement in sql included the lowest parameter and the highest parameter, thas how its work.