Results for “if”
Small, practical examples. Search by task or narrow things down below.
Display a fallback for missing data
SQLite: Return a supplied label when a column contains NULL.
SQLite✓ Tested
Display a hint for a truly empty container
CSS: The empty selector requires no element or text children, including whitespace text nodes.
CSS✓ Tested
Display a label in uppercase without changing its text
CSS: Text-transform changes visual casing while preserving the DOM’s source text.
CSS✓ Tested
Display a short code sample
HTML: Learn how to display a short code sample in a complete browser example.
HTML✓ Tested
Display reserved characters as text
HTML: Learn how to display reserved characters as text in a complete browser example.
HTML✓ Tested
Distinguish row count from non-null value count
SQL: COUNT(*) includes every row while COUNT(column) skips NULL values.
SQL✓ Tested
Distinguish row count from non-null value count
SQL Server: COUNT(*) includes every row while COUNT(column) skips NULL values.
SQL Server✓ Tested
Distinguish row count from non-null value count
Postgres: COUNT(*) includes every row while COUNT(column) skips NULL values.
Postgres✓ Tested
Distinguish row count from non-null value count
SQLite: COUNT(*) includes every row while COUNT(column) skips NULL values.
SQLite✓ Tested
Divide an ordered result into numbered buckets
SQL: NTILE distributes rows across buckets; include a unique tie-breaker for deterministic assignment.
SQL✓ Tested
Divide an ordered result into numbered buckets
SQL Server: NTILE distributes rows across buckets; include a unique tie-breaker for deterministic assignment.
SQL Server✓ Tested
Divide an ordered result into numbered buckets
Postgres: NTILE distributes rows across buckets; include a unique tie-breaker for deterministic assignment.
Postgres✓ Tested