FIND YOUR NEXT FEW LINES

Results for “SQL Server”

Small, practical examples. Search by task or narrow things down below.

502 snippets foundClear filters
SQLiteGetting Started

Display a fallback for missing data

SQLite: Return a supplied label when a column contains NULL.

SQLite✓ Tested
SQLReporting & grouped calculations

Distinguish row count from non-null value count

SQL: COUNT(*) includes every row while COUNT(column) skips NULL values.

SQL✓ Tested
SQLiteReporting & grouped calculations

Distinguish row count from non-null value count

SQLite: COUNT(*) includes every row while COUNT(column) skips NULL values.

SQLite✓ Tested
SQLWindow analytics

Divide an ordered result into numbered buckets

SQL: NTILE distributes rows across buckets; include a unique tie-breaker for deterministic assignment.

SQL✓ Tested
SQLiteWindow analytics

Divide an ordered result into numbered buckets

SQLite: NTILE distributes rows across buckets; include a unique tie-breaker for deterministic assignment.

SQLite✓ Tested
SQLConstraints & defaults

Enforce a bounded numeric range

SQL: A named CHECK constraint keeps numeric values inside an inclusive interval.

SQL✓ Tested
SQLiteConstraints & defaults

Enforce a bounded numeric range

SQLite: A named CHECK constraint keeps numeric values inside an inclusive interval.

SQLite✓ Tested
SQLSchema design & transactions

Enforce a relationship between two columns

SQL: A row-level CHECK can require a start value to be no greater than an end value.

SQL✓ Tested
SQLiteSchema design & transactions

Enforce a relationship between two columns

SQLite: A row-level CHECK can require a start value to be no greater than an end value.

SQLite✓ Tested
SQLSchema design & transactions

Enforce uniqueness with a dedicated index

SQL: A unique index rejects a duplicate combination independently of query plans.

SQL✓ Tested
SQLiteSchema design & transactions

Enforce uniqueness with a dedicated index

SQLite: A unique index rejects a duplicate combination independently of query plans.

SQLite✓ Tested
SQLSchema design & transactions

Expose a reusable filtered view

SQL: A view stores a query definition rather than a snapshot of its rows.

SQL✓ Tested