sqlcmd.net validated sql reference

#string

Commands grouped around the same concept, pattern, or recurring problem.

20 commands with this tag Browse related patterns quickly
intermediate string-processing MySQL MariaDB SQL Server PostgreSQL SQLite

Assemble A Key/Value String

Format several known values into one compact `key=value` string for transport or handoff.

advanced recursion MySQL MariaDB SQL Server PostgreSQL SQLite

Build A Path String While Traversing A Hierarchy

Accumulate a breadcrumb path string as a recursive CTE walks a parent-child tree.

beginner string-processing MySQL MariaDB SQL Server PostgreSQL SQLite

Change Text Case With UPPER And LOWER

Convert string values to all uppercase or all lowercase using `UPPER` and `LOWER`.

advanced aggregation MySQL MariaDB SQL Server PostgreSQL SQLite

Concatenate Values Within A Group

Aggregate multiple string values from grouped rows into a single delimited string.

intermediate conversion MySQL MariaDB SQL Server PostgreSQL SQLite

Encode Text As Base64

Turn one plain-text payload into a base64 string for transport or lookup.

advanced string-processing MySQL MariaDB PostgreSQL

Extract A Substring Matching A Regular Expression

Return the portion of a string that matches a regular expression pattern, useful for parsing structured text without fixed delimiters.

intermediate string-processing MySQL MariaDB SQL Server PostgreSQL SQLite

Extract Part Of A String With SUBSTRING

Return only part of a text value by position and length.

beginner filtering MySQL MariaDB SQL Server PostgreSQL SQLite

Filter Rows By Pattern With LIKE

Match string columns against a wildcard pattern using `LIKE`.

intermediate string-processing MySQL MariaDB SQL Server PostgreSQL SQLite

Find The Position Of A Substring Within A String

Locate where a substring first appears inside a string, returning its 1-based character position.

intermediate conversion MySQL MariaDB SQL Server PostgreSQL SQLite

Format A Number As A Decimal String

Convert a numeric value into a formatted string with a fixed number of decimal places, optionally including thousands separators.

beginner string-processing MySQL MariaDB SQL Server PostgreSQL SQLite

Get The Length Of A String

Return the number of characters in a string using `LENGTH` or `LEN`.

beginner string-processing MySQL MariaDB SQL Server PostgreSQL SQLite

Join Strings With CONCAT

Combine multiple text values into one string in the query result.

beginner string-processing MySQL MariaDB SQL Server PostgreSQL SQLite

Join Text Values With Hyphens

Combine multiple text values into one hyphen-separated key-like string.

intermediate string-processing MySQL MariaDB SQL Server PostgreSQL SQLite

Pad A String To A Fixed Length With LPAD And RPAD

Left-pad or right-pad a string to a fixed width by filling with a repeated character.

intermediate conversion MySQL MariaDB SQL Server PostgreSQL SQLite

Parse A Formatted String Into A Date

Convert a text string in a known format into a native DATE value using engine-specific parsing functions.

beginner string-manipulation MySQL MariaDB SQL Server PostgreSQL

Repeat or Reverse a String

Use `REPEAT` to duplicate a string a given number of times, and `REVERSE` to flip its character order.

intermediate string-manipulation MySQL MariaDB PostgreSQL

Replace Substrings With a Regular Expression

Use `REGEXP_REPLACE` to substitute every match of a pattern in a string with a replacement value.

beginner string-processing MySQL MariaDB SQL Server PostgreSQL SQLite

Replace Text Within A String With REPLACE

Substitute all occurrences of a substring with a new value using `REPLACE`.

advanced string-processing SQL Server PostgreSQL

Split A Delimited String Into Rows

Expand a comma-separated or delimited string into one row per element, turning a single cell into a proper set of rows.

beginner string-processing MySQL MariaDB SQL Server PostgreSQL SQLite

Trim Whitespace From Text

Remove leading and trailing whitespace from string values with `TRIM`.