IN starts with visible source rows and a literal list.

highlighted = computed this step

Base rows

IN starts with visible source rows and a visible literal list.

row value and list\text{row value and list}

Show the input

The table has 5 source rows.

source rows=5\text{source rows}=5

IN-list examples are tiny finite WHERE-style filters with SQL-style TRUE/FALSE/UNKNOWN behavior; subqueries, type coercion, optimizer behavior, indexes, dialect details, and product claims are out of scope.

Base rows: base rowsidcolor1red2blue3green4NULL5red IN-list evaluationsourcevaluevaluesmodeinTruthtruthkeptreason0red[red, blue]inTRUETRUEyesmatched literal1blue[red, blue]inTRUETRUEyesmatched literal2green[red, blue]inFALSEFALSEnono match3NULL[red, blue]inUNKNOWNUNKNOWNnotested NULL4red[red, blue]inTRUETRUEyesmatched literal IN-list output rowsidcolor1red2blue5red IN-list factsfactvalueinputRowCount5listLength2outputRowCount3trueRows3falseRows1unknownRows1testedNullRows1nullListNoMatchRows0modeinrowOrdersource_order

One column, one list

This tiny model tests one column against one literal list.

one membership test\text{one membership test}

Summary

Each row asks whether its value belongs to the list.

value in list\text{value in list}