FIND YOUR NEXT FEW LINES

Results for “SQL Server”

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

502 snippets foundClear filters
SQL ServerSelect & page

Select the highest values with TOP

Limit an ordered SQL Server result.

TOP✓ Tested
SQL ServerJSON & results

Serialize query rows as JSON

Return a JSON array directly from a SELECT.

FOR JSON✓ Tested
SQL ServerDates & text

Split delimited text with positions

Retain original order with STRING_SPLIT ordinals.

STRING_SPLIT✓ Tested
SQL ServerSelect & page

Substitute a value for NULL

Use SQL Server’s ISNULL expression.

ISNULL✓ Tested
SQL ServerJSON & results

Turn JSON into typed rows

Project JSON array items into SQL columns.

OPENJSON✓ Tested
SQL ServerJSON & results

Update a JSON property

Create updated JSON text with JSON_MODIFY.

JSON_MODIFY✓ Tested
SQL ServerTransactions & tables

Use a session-scoped temporary table

Store intermediate rows in a local # table.

temporary table✓ Tested
SQL ServerTransactions & tables

Use a small table variable

Declare rows for a short batch.

table variable✓ Tested
GoHTTP & URLs

Test an HTTP handler without a server

Test an HTTP handler without a server using a complete Go program with explicit sample inputs.

Go✓ Tested
SQLGetting Started

Accept either of two conditions

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

SQL✓ Tested
SQLiteGetting Started

Accept either of two conditions

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

SQLite✓ 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