between statement

 

1. between statement

between A and B: Includes the value of both endpoints, [A, B], A <= value <= B

1
2
SELECT * from t_user
where age between 10 and 20;

2. not between statement

not between A and B: The opposite of between A and B, it does not include the values of the two endpoints, (_, A) and (B, _), value < A and B < value

1
2
SELECT * from t_user
where age not between 10 and 20;