A min/max rule checks a tiny integer range.

highlighted = computed this step

Number bounds

A min/max rule checks that a number stays inside a small exact range.

1qty51\le \text{qty}\le5

Check the quantity

Two rows miss the range, so violations are 2 and failed rows are 2.

violations=2\text{violations}=2

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.

Number bounds: tableidstatusqty1new22done03done9 row rulesnamekindcolumndetailqty_rangebetweenqty1..5 row pass/failrowstatusfailed rules0pass[]1fail[qty_range]2fail[qty_range] violationsrowrulecolumnvaluereason1qty_rangeqty0below_min2qty_rangeqty9above_max check factsfactvaluerowCount3ruleCount1passCount1failCount2violationCount2allRowsPassnonullMeansMissingyes

Read both sides

One quantity is below the minimum and one is above the maximum.

below or above\text{below or above}

Summary

Only integer bounds are modeled here; general CHECK expressions stay out of scope.

integer bounds only\text{integer bounds only}