Check constraints begin with visible rows and columns.

highlighted = computed this step

Start with a tiny table

A check starts with visible rows and named columns.

rows first\text{rows first}

Show the rows

This table has 3 rows and 0 rules so far.

rows=3\text{rows}=3

Check examples are tiny finite row-rule validations; SQL dialects, DDL timing, CHECK expression languages, enforcement strategy, performance, and product behavior are out of scope.

Start with a tiny table: tableidstatusqty1new22done43new5 row rulesnamekindcolumndetailnonenonenonenone row pass/failrowstatusfailed rules0pass[]1pass[]2pass[] violationsrowrulecolumnvaluereasonnonenonenonenonenone check factsfactvaluerowCount3ruleCount0passCount3failCount0violationCount0allRowsPassyesnullMeansMissingyes

No hidden rule yet

With no row rules, every row is shown as pass in this tiny model.

visible inputs only\text{visible inputs only}

Summary

Later steps add one small rule at a time and recompute the pass/fail rows.

recompute after each rule\text{recompute after each rule}