Results for “empty”
Small, practical examples. Search by task or narrow things down below.
Add days to a date
Use DATEADD for date arithmetic.
DATEADD✓ Tested
Add values across several rows
SQL Server: Use SUM to calculate a total quantity.
SQL Server✓ Tested
Add values across several rows
Postgres: Use SUM to calculate a total quantity.
Postgres✓ Tested
Append a line to a practice file
Linux Commands: Append a line to a practice file using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Append several items to an array
Bash Scripts: Array-plus-equals adds elements without losing spaces inside a quoted item.
Bash Scripts✓ Tested
Apply a default when an insert omits a column
SQL Server: A default supplies an omitted value; an explicit NULL still follows the column’s nullability rules.
SQL Server✓ Tested
Apply a default when an insert omits a column
Postgres: A default supplies an omitted value; an explicit NULL still follows the column’s nullability rules.
Postgres✓ Tested
Assign a rank within each group
Number rows with a partitioned window.
ROW_NUMBER✓ Tested
Attach an overall count to every row
SQL Server: An uncorrelated scalar subquery supplies the same aggregate to each output row.
SQL Server✓ Tested
Attach an overall count to every row
Postgres: An uncorrelated scalar subquery supplies the same aggregate to each output row.
Postgres✓ Tested
Block deletion of a referenced parent
SQL Server: The default foreign-key action prevents deletion while a child still refers to the parent.
SQL Server✓ Tested
Block deletion of a referenced parent
Postgres: The default foreign-key action prevents deletion while a child still refers to the parent.
Postgres✓ Tested