WHERE-style output keeps TRUE rows in source order.

highlighted = computed this step

TRUE-only output order

This WHERE-style filter keeps TRUE rows only.

TRUE rows only\text{TRUE rows only}

Read output rows

The output has 3 rows, while 1 UNKNOWN row is dropped.

output rows=3\text{output rows}=3

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.

TRUE-only output order: 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

Source order remains

Kept rows stay in the same order as the source table.

source order kept\text{source order kept}

Summary

IN-list filtering keeps TRUE rows and does not sort them.

TRUE only source order\text{TRUE only source order}