A defaulted insert starts from visible rows and schema defaults.

highlighted = computed this step

Table and schema before insert

Start with rows plus a schema that names which columns have defaults.

rows plus schema\text{rows plus schema}

Read the setup

The base table has 2 rows and the schema has 5 columns.

columns=5\text{columns}=5

DEFAULT examples are tiny finite insert checks; SQL dialect completeness, generated defaults, identity columns, triggers, constraints beyond visible NOT NULL, indexes, transactions, performance, and product behavior are out of scope.

Table and schema before insert: base rowsidnamestatusnotescore1Adaactiveseed102BennewNULL0 Schema defaultscolumnnotNulldefaultidyesNO_DEFAULTnameyesNO_DEFAULTstatusyesnewnotenononescoreyes0 Candidate resolutioncolumnsupplieddefaultresultsourcestatusreasonidyesNO_DEFAULT3explicitokoknameyesNO_DEFAULTCyexplicitokokstatusnonewnewdefaultokoknotenononenonedefaultokokscoreno00defaultokok Candidate checkfieldvaluedecisionacceptedresolvedRow(3, Cy, new, none, 0)reasons()insertedRowIndex2 Rows after candidateidnamestatusnotescore1Adaactiveseed102BennewNULL03Cynewnone0 DEFAULT factsfactvaluebaseRowCount2schemaColumnCount5defaultColumnCount3suppliedColumnCount2omittedColumnCount3appliedDefaultCount3explicitValueCount2explicitNullCount0rejectedReasonCount0candidateDecisionacceptedfinalRowCount3explicitNullInvokesDefaultno_toy_rule

Defaults are visible

A column either has a displayed default token or says NO_DEFAULT.

default tokens shown\text{default tokens shown}

Summary

The insert candidate is checked against this exact schema.

schema before insert\text{schema before insert}