BETWEEN includes the lower and upper endpoints.

highlighted = computed this step

Inclusive endpoints

BETWEEN includes the lower endpoint and the upper endpoint.

inclusive range\text{inclusive range}

Read inside rows

The range has 3 inside rows, so it outputs 3 TRUE rows.

inside rows=3\text{inside rows}=3

BETWEEN examples are tiny finite-table transforms with SQL-style TRUE/FALSE/UNKNOWN results; SQL dialect completeness, type coercion, optimizer behavior, indexing, and product claims are out of scope.

Inclusive endpoints: base rowsidnameqty1small32edge-low53middle74edge-high95large126missingNULL BETWEEN result per rowsourcetestedValuelowerupperrangePositionbaseTruthtruthoutputRole0359belowFALSEFALSEdropped1559insideTRUETRUEkept2759insideTRUETRUEkept3959insideTRUETRUEkept41259aboveFALSEFALSEdropped5NULL59unknownUNKNOWNUNKNOWNdropped WHERE-style TRUE-only output rowsidnameqty2edge-low53middle74edge-high9 BETWEEN factsfactvalueinputRowCount6trueCount3falseCount2unknownCount1outputRowCount3droppedRowCount3belowCount1insideCount3aboveCount1equalEndpointRangenonegatednowhereKeepsTRUE_only_source_order

Edges count

The low edge and high edge are inside, not below or above.

edges included\text{edges included}

Summary

BETWEEN is inclusive at both ends in this finite model.

lower and upper included\text{lower and upper included}