FIND YOUR NEXT FEW LINES

Results for “Text validation & formatting”

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

939 snippets foundClear filters
SQL ServerConstraints & defaults

Make a pair of columns unique together

SQL Server: A composite primary key permits repeated individual values while forbidding a duplicate combination.

SQL Server✓ Tested
PostgresConstraints & defaults

Make a pair of columns unique together

Postgres: A composite primary key permits repeated individual values while forbidding a duplicate combination.

Postgres✓ Tested
SQLiteConstraints & defaults

Make a pair of columns unique together

SQLite: A composite primary key permits repeated individual values while forbidding a duplicate combination.

SQLite✓ Tested
SQLSelect & filter

Match one of several values

Use IN to avoid repeating equality conditions.

IN✓ Tested
SQLGetting Started

Match one value from a short list

SQL: Use IN for a set of allowed values.

SQL✓ Tested
SQL ServerGetting Started

Match one value from a short list

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

SQL Server✓ Tested
PostgresGetting Started

Match one value from a short list

Postgres: Use IN for a set of allowed values.

Postgres✓ Tested
SQLiteGetting Started

Match one value from a short list

SQLite: Use IN for a set of allowed values.

SQLite✓ Tested
SQLJoins & subqueries

Name an intermediate query with a CTE

Make a filtered result reusable within one statement.

CTE✓ Tested
TypeScriptTypes & functions

Narrow a union using typeof

Handle text and numeric values with separate branches.

union✓ Tested
HTMLLinks & accessibility

Open a link in a separate tab

Declare a separate browsing context with an explicit noopener relationship.

HTML✓ Tested
JavaScriptStrings

Pad a numeric label

Convert a number to text and pad it to a fixed width.

JavaScript✓ Tested