Results for “format”
Small, practical examples. Search by task or narrow things down below.
Return zero for a sum over no rows
SQLite: SUM produces NULL for an empty input; COALESCE supplies the desired reporting default.
SQLite✓ Tested
Roll back a trial update
Group a change in a transaction and undo it.
transaction✓ Tested
Round a timestamp down to its month
Group dates by a calendar boundary.
date_trunc✓ Tested
Run a first SELECT query
SQL: Return a literal value without creating a table.
SQL✓ Tested
Run a first SELECT query
SQL Server: Return a literal value without creating a table.
SQL Server✓ Tested
Run a first SELECT query
Postgres: Return a literal value without creating a table.
Postgres✓ Tested
Run a first SELECT query
SQLite: Return a literal value without creating a table.
SQLite✓ Tested
Search a small FTS5 table
Use SQLite’s full-text index to match a term.
FTS5✓ Tested
Search for a literal LIKE wildcard
SQL: Declare an escape character so a percent sign in the pattern is literal.
SQL✓ Tested
Search for a literal LIKE wildcard
SQL Server: Declare an escape character so a percent sign in the pattern is literal.
SQL Server✓ Tested
Search for a literal LIKE wildcard
Postgres: Declare an escape character so a percent sign in the pattern is literal.
Postgres✓ Tested
Search for a literal LIKE wildcard
SQLite: Declare an escape character so a percent sign in the pattern is literal.
SQLite✓ Tested