Results for “Pipes & formatting”
Small, practical examples. Search by task or narrow things down below.
Reject a negative quantity with CHECK
SQL Server: Combine NOT NULL and CHECK because an unknown NULL check result is normally accepted.
SQL Server✓ Tested
Reject a negative quantity with CHECK
Postgres: Combine NOT NULL and CHECK because an unknown NULL check result is normally accepted.
Postgres✓ Tested
Reject a negative quantity with CHECK
SQLite: Combine NOT NULL and CHECK because an unknown NULL check result is normally accepted.
SQLite✓ Tested
Reject duplicate business identifiers
SQL: A UNIQUE constraint protects a business key independently of the primary key.
SQL✓ Tested
Reject duplicate business identifiers
SQL Server: A UNIQUE constraint protects a business key independently of the primary key.
SQL Server✓ Tested
Reject duplicate business identifiers
Postgres: A UNIQUE constraint protects a business key independently of the primary key.
Postgres✓ Tested
Reject duplicate business identifiers
SQLite: A UNIQUE constraint protects a business key independently of the primary key.
SQLite✓ Tested
Remove dependent rows with a declared cascade
SQL: ON DELETE CASCADE removes children when their referenced parent is deleted.
SQL✓ Tested
Remove dependent rows with a declared cascade
SQL Server: ON DELETE CASCADE removes children when their referenced parent is deleted.
SQL Server✓ Tested
Remove dependent rows with a declared cascade
Postgres: ON DELETE CASCADE removes children when their referenced parent is deleted.
Postgres✓ Tested
Remove dependent rows with a declared cascade
SQLite: ON DELETE CASCADE removes children when their referenced parent is deleted.
SQLite✓ Tested
Remove duplicate result values
SQL: Use DISTINCT when repeated category values are not useful.
SQL✓ Tested