This toy model places NULL sort keys last.

highlighted = computed this step

NULL placement

This toy model makes NULL sort keys last so the rule is visible.

NULLS LAST toy convention\text{NULLS LAST toy convention}

Read NULL placement

Across 7 rows, nullPlacement is NULLS_LAST_TOY_CONVENTION.

NULLS LAST\text{NULLS LAST}

Multi-column sorting examples are tiny finite table transforms; SQL dialect completeness, collation rules, optimizer behavior, indexing, product behavior, and performance claims are out of scope.

NULL sort placement: base rowsidregionqtylabel1east2a2west2b3east5c4east5d5westNULLe6north3f7eastNULLg ORDER BY keyscolumndirectionqtyascidasc Sort keys by source rowsourceinputsortKeyorderedRank0(1, east, 2, a)(2, 1)01(2, west, 2, b)(2, 2)12(3, east, 5, c)(5, 3)33(4, east, 5, d)(5, 4)44(5, west, NULL, e)(NULL, 5)55(6, north, 3, f)(3, 6)26(7, east, NULL, g)(NULL, 7)6 Tie groupssortKeysourceRowstieConventionnonenonenone Ordered rowssourcevaluessortKey0(1, east, 2, a)(2, 1)1(2, west, 2, b)(2, 2)5(6, north, 3, f)(3, 6)2(3, east, 5, c)(5, 3)3(4, east, 5, d)(5, 4)4(5, west, NULL, e)(NULL, 5)6(7, east, NULL, g)(NULL, 7) Page rows after LIMITsourcevaluessortKey0(1, east, 2, a)(2, 1)1(2, west, 2, b)(2, 2)5(6, north, 3, f)(3, 6)2(3, east, 5, c)(5, 3)3(4, east, 5, d)(5, 4)4(5, west, NULL, e)(NULL, 5)6(7, east, NULL, g)(NULL, 7) Multi-sort factsfactvaluerowCount7orderColumnCount2tieGroupCount0unresolvedTiesnonullPlacementNULLS_LAST_TOY_CONVENTIONtieConventionsource_order_for_unbroken_tieslimitnonepageRowCount7skippedAfterLimit0outputOrderdeterministic_order_then_source_tie

Explicit convention

The lesson does not claim all SQL systems place NULLs the same way.

explicit toy rule\text{explicit toy rule}

Summary

NULL placement is part of this finite model boundary.

scoped NULL order\text{scoped NULL order}