FIND YOUR NEXT FEW LINES

Results for “Functions & data types”

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

787 snippets foundClear filters
PostgresWindow analytics

Select the top row in each group with a tie-breaker

Postgres: Filter an outer query on ROW_NUMBER because window functions are not evaluated in WHERE.

Postgres✓ Tested
SQLiteWindow analytics

Select the top row in each group with a tie-breaker

SQLite: Filter an outer query on ROW_NUMBER because window functions are not evaluated in WHERE.

SQLite✓ Tested
SQL ServerJSON & results

Turn JSON into typed rows

Project JSON array items into SQL columns.

OPENJSON✓ Tested
TypeScriptSafe data handling

Update an object with a readonly input

Create a changed copy while retaining the original.

readonly✓ Tested
TypeScriptSafe data handling

Validate an unknown value with a type guard

Check a field before treating unknown data as a typed object.

unknown✓ Tested
SQLGetting Started

Accept either of two conditions

SQL: Use OR to keep matching names or out-of-stock rows.

SQL✓ Tested
SQL ServerGetting Started

Accept either of two conditions

SQL Server: Use OR to keep matching names or out-of-stock rows.

SQL Server✓ Tested
PostgresDates & series

Add an interval to a date

Perform calendar arithmetic with an interval literal.

INTERVAL✓ Tested
SQLSchema design & transactions

Add an optional field to an existing table

SQL: A nullable column permits existing rows to remain valid while data is filled later.

SQL✓ Tested
SQL ServerSchema design & transactions

Add an optional field to an existing table

SQL Server: A nullable column permits existing rows to remain valid while data is filled later.

SQL Server✓ Tested
PostgresSchema design & transactions

Add an optional field to an existing table

Postgres: A nullable column permits existing rows to remain valid while data is filled later.

Postgres✓ Tested
SQLiteSchema design & transactions

Add an optional field to an existing table

SQLite: A nullable column permits existing rows to remain valid while data is filled later.

SQLite✓ Tested