FIND YOUR NEXT FEW LINES

Results for “Collections & data structures”

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

694 snippets foundClear filters
SQL ServerGetting Started

Match one value from a short list

SQL Server: Use IN for a set of allowed values.

SQL Server✓ Tested
SQLText cleanup & matching

Measure the length of ordinary text

SQL: Use the engine’s text-length function; this ASCII example has no trailing spaces.

SQL✓ Tested
SQL ServerText cleanup & matching

Measure the length of ordinary text

SQL Server: Use the engine’s text-length function; this ASCII example has no trailing spaces.

SQL Server✓ Tested
PostgresText cleanup & matching

Measure the length of ordinary text

Postgres: Use the engine’s text-length function; this ASCII example has no trailing spaces.

Postgres✓ Tested
SQLiteText cleanup & matching

Measure the length of ordinary text

SQLite: Use the engine’s text-length function; this ASCII example has no trailing spaces.

SQLite✓ Tested
PythonCollections

Merge two dictionaries

Combine two dictionaries into a new dictionary. When a key appears in both inputs, the value from the second dictionary wins.

dictionary✓ Tested
jQueryInsertion & wrapping

Move a node without losing its event handler

jQuery: detach retains jQuery data and events for reinsertion.

jQuery✓ Tested
SQLJoins & subqueries

Name an intermediate query with a CTE

Make a filtered result reusable within one statement.

CTE✓ Tested
SQLText cleanup & matching

Normalize ASCII text to lowercase

SQL: LOWER is useful for display normalization; indexed case-insensitive search depends on the database collation and schema.

SQL✓ Tested
SQL ServerText cleanup & matching

Normalize ASCII text to lowercase

SQL Server: LOWER is useful for display normalization; indexed case-insensitive search depends on the database collation and schema.

SQL Server✓ Tested
PostgresText cleanup & matching

Normalize ASCII text to lowercase

Postgres: LOWER is useful for display normalization; indexed case-insensitive search depends on the database collation and schema.

Postgres✓ Tested
SQLiteText cleanup & matching

Normalize ASCII text to lowercase

SQLite: LOWER is useful for display normalization; indexed case-insensitive search depends on the database collation and schema.

SQLite✓ Tested