Results for “if”
Small, practical examples. Search by task or narrow things down below.
Count rows satisfying separate conditions
Postgres: SUM over CASE expressions calculates several conditional counts in one scan.
Postgres✓ Tested
Count rows satisfying separate conditions
SQLite: SUM over CASE expressions calculates several conditional counts in one scan.
SQLite✓ Tested
Count the rows in a table
SQL: COUNT(*) includes every row, including rows with NULL columns.
SQL✓ Tested
Count the rows in a table
SQL Server: COUNT(*) includes every row, including rows with NULL columns.
SQL Server✓ Tested
Count the rows in a table
Postgres: COUNT(*) includes every row, including rows with NULL columns.
Postgres✓ Tested
Count the rows in a table
SQLite: COUNT(*) includes every row, including rows with NULL columns.
SQLite✓ Tested
Create a complete HTML document
HTML: Learn how to create a complete HTML document in a complete browser example.
HTML✓ Tested
Create a recovery branch for a recently moved commit
Git: The reflog can identify a previous local HEAD position while its entry and objects remain available.
Git✓ Tested
Create a small table with headers
HTML: Learn how to create a small table with headers in a complete browser example.
HTML✓ Tested
Create a STRICT table
Require values compatible with declared column types.
STRICT✓ Tested
Create a table and insert its first row
SQL: Define column types and a primary key, then insert one row using an explicit column list.
SQL✓ Tested
Create a table and insert its first row
SQL Server: Define column types and a primary key, then insert one row using an explicit column list.
SQL Server✓ Tested