Results for “constraints”
Small, practical examples. Search by task or narrow things down below.
Enforce a bounded numeric range
SQL Server: A named CHECK constraint keeps numeric values inside an inclusive interval.
SQL Server✓ Tested
Enforce a bounded numeric range
Postgres: A named CHECK constraint keeps numeric values inside an inclusive interval.
Postgres✓ Tested
Enforce a bounded numeric range
SQLite: A named CHECK constraint keeps numeric values inside an inclusive interval.
SQLite✓ Tested
Keep children while clearing a deleted relationship
SQL: ON DELETE SET NULL requires a nullable foreign-key column.
SQL✓ Tested
Keep children while clearing a deleted relationship
SQL Server: ON DELETE SET NULL requires a nullable foreign-key column.
SQL Server✓ Tested
Keep children while clearing a deleted relationship
Postgres: ON DELETE SET NULL requires a nullable foreign-key column.
Postgres✓ Tested
Keep children while clearing a deleted relationship
SQLite: ON DELETE SET NULL requires a nullable foreign-key column.
SQLite✓ Tested
Limit a numeric input to an inclusive range
HTML: Number inputs expose range validation separately from the entered text.
HTML✓ Tested
Limit typed text to a maximum length
HTML: Maxlength limits ordinary user editing without replacing server-side validation.
HTML✓ Tested
Make a pair of columns unique together
SQL: A composite primary key permits repeated individual values while forbidding a duplicate combination.
SQL✓ Tested
Make a pair of columns unique together
SQL Server: A composite primary key permits repeated individual values while forbidding a duplicate combination.
SQL Server✓ Tested
Make a pair of columns unique together
Postgres: A composite primary key permits repeated individual values while forbidding a duplicate combination.
Postgres✓ Tested