Skip to main content

BETWEEN, IN & NOT IN

Learn BETWEEN, IN & NOT IN (Operators, MySQL) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Introduction x BETWEEN a AND b is shorthand for x >= a AND x <= b (both ends inclusive). x IN (v1, v2, ...) tests membership in a list or subquery; NOT IN is its negation. Both work on numbers, strings and dates.

More lessons in Operators