Results for “SQL Server”
Small, practical examples. Search by task or narrow things down below.
Limit typed text to a maximum length
HTML: Maxlength limits ordinary user editing without replacing server-side validation.
HTML✓ Tested
List distinct values
Remove duplicate category values from a result.
DISTINCT✓ Tested
List unordered pairs without duplicate reversals
Postgres: Join using an increasing key comparison to omit self-pairs and reversed duplicates.
Postgres✓ Tested
Make a pair of columns unique together
Postgres: A composite primary key permits repeated individual values while forbidding a duplicate combination.
Postgres✓ Tested
Match a known text prefix
Postgres: A percent wildcard matches zero or more characters following the prefix.
Postgres✓ Tested
Match a text prefix
Postgres: Use a percent wildcard after a known prefix.
Postgres✓ Tested
Match one of several values
Use IN to avoid repeating equality conditions.
IN✓ Tested
Match one value from a short list
Postgres: Use IN for a set of allowed values.
Postgres✓ Tested
Measure the length of ordinary text
Postgres: Use the engine’s text-length function; this ASCII example has no trailing spaces.
Postgres✓ Tested
Name an intermediate query with a CTE
Make a filtered result reusable within one statement.
CTE✓ Tested
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
Normalize ASCII text to uppercase
Postgres: UPPER changes character case under the database’s text rules.
Postgres✓ Tested