All functions > STRING
All functions in the STRING category.
Backend availability
DD Available DD Partially available DD Not available DD DuckDB · PG Postgres · CH ClickHouse · TR Trino · BQ BigQuery · SF Snowflake · DB Databricks · SV Serving
Case Conversion
| Function | Description | Backends |
|---|
LOWER() | Returns the string with all characters converted to lowercase. | DD | PG | CH | TR | BQ | SF | DB | SV |
UPPER() | Returns the string with all characters converted to uppercase. | DD | PG | CH | TR | BQ | SF | DB | SV |
TITLE() | Returns the string with the first letter of each whitespace-delimited word in uppercase and the... | DD | PG | CH | TR | BQ | SF | DB | SV |
Padding And Trimming
| Function | Description | Backends |
|---|
TRIM() | Returns the string with whitespace from both ends removed. | DD | PG | CH | TR | BQ | SF | DB | SV |
LTRIM() | Returns the string with whitespace from the left (beginning) removed. | DD | PG | CH | TR | BQ | SF | DB | SV |
RTRIM() | Returns the string with whitespace from the right (end) removed. | DD | PG | CH | TR | BQ | SF | DB | SV |
LPAD() | Returns the string padded on the left to a specified length with a padding string. | DD | PG | CH | TR | BQ | SF | DB | SV |
RPAD() | Returns the string padded on the right to a specified length with a padding string. | DD | PG | CH | TR | BQ | SF | DB | SV |
Search String
| Function | Description | Backends |
|---|
STARTS_WITH() | Returns TRUE if a string starts with a specified prefix. | DD | PG | CH | TR | BQ | SF | DB | SV |
ENDS_WITH() | Returns TRUE if a string ends with a specified suffix. | DD | PG | CH | TR | BQ | SF | DB | SV |
POSITION | Returns the 1-based index of the first occurrence of a substring within a string. | DD | PG | CH | TR | BQ | SF | DB | SV |
STRPOS() | Returns the position of a substring within a string, optionally finding the N-th occurrence. | DD | PG | CH | TR | BQ | SF | DB | SV |
Extraction String
| Function | Description | Backends |
|---|
LEFT() | Returns the first `n` characters of the string (or the full string when `n` is greater than its... | DD | PG | CH | TR | BQ | SF | DB | SV |
RIGHT() | Returns the last `n` characters of the string (or the full string when `n` is greater than its... | DD | PG | CH | TR | BQ | SF | DB | SV |
SUBSTR() | Returns a substring from a string starting at a specified position. | DD | PG | CH | TR | BQ | SF | DB | SV |
SPLIT() | Returns an array of substrings from a string split by a delimiter. | DD | PG | CH | TR | BQ | SF | DB | SV |
SPLIT_PART() | Returns a specific part of a string after splitting by a delimiter. | DD | PG | CH | TR | BQ | SF | DB | SV |
Transformation String
| Function | Description | Backends |
|---|
REVERSE() | Returns the string with all characters in reverse order. | DD | PG | CH | TR | BQ | SF | DB | SV |
REPLACE() | Returns the string with all occurrences of a substring replaced with another substring. | DD | PG | CH | TR | BQ | SF | DB | SV |
FORMAT(...) | Builds a VARCHAR from a C-style format string and one scalar argument per placeholder. | DD | PG | CH | TR | BQ | SF | DB | SV |
TRANSLATE() | Returns a string with character-level replacements applied based on character-to-character mappings. | DD | PG | CH | TR | BQ | SF | DB | SV |
BASE64_ENCODE() | Encodes a string as standard Base64 text. | DD | PG | CH | TR | BQ | SF | DB | SV |
BASE64_DECODE() | Decodes a Base64 string back to plain text. | DD | PG | CH | TR | BQ | SF | DB | SV |
HEX_ENCODE() | Encodes a string as a contiguous hexadecimal string (two hex digits per byte). | DD | PG | CH | TR | BQ | SF | DB | SV |
HEX_DECODE() | Decodes a contiguous hexadecimal string back to plain text. | DD | PG | CH | TR | BQ | SF | DB | SV |
URL_ENCODE() | Encodes a string for safe use in URL components using percent-encoding (RFC 3986). | DD | PG | CH | TR | BQ | SF | DB | SV |
URL_DECODE() | Decodes a percent-encoded string (RFC 3986). | DD | PG | CH | TR | BQ | SF | DB | SV |
Concatenation
| Function | Description | Backends |
|---|
CONCAT(...) | Returns a single concatenated string from a list of strings. | DD | PG | CH | TR | BQ | SF | DB | SV |
|| [concatenation] | Concatenates two strings; chains associate to the left (same underlying `CONCAT_FN` bundle as... | DD | PG | CH | TR | BQ | SF | DB | SV |
CONCAT_WS(...) | Returns a concatenated string from a list of strings with a separator between each element. | DD | PG | CH | TR | BQ | SF | DB | SV |
Character
| Function | Description | Backends |
|---|
LENGTH() | Returns the number of characters in a string. | DD | PG | CH | TR | BQ | SF | DB | SV |
CHR() | Returns the character corresponding to the given Unicode code point. | DD | PG | CH | TR | BQ | SF | DB | SV |
CODEPOINT() | Returns the Unicode code point of a one-character string. | DD | PG | CH | TR | BQ | SF | DB | SV |
Distance
| Function | Description | Backends |
|---|
HAMMING_DISTANCE() | Returns the Hamming distance between two strings of equal length. | DD | PG | CH | TR | BQ | SF | DB | SV |
LEVENSHTEIN_DISTANCE() | Returns the Levenshtein (edit) distance between two strings. | DD | PG | CH | TR | BQ | SF | DB | SV |
Phonetic
| Function | Description | Backends |
|---|
SOUNDEX() | Returns a four-character Soundex code representing the phonetic sound of a string. | DD | PG | CH | TR | BQ | SF | DB | SV |
Hash
| Function | Description | Backends |
|---|
MD5() | Returns the MD5 hash of a string as a 32-character hexadecimal string. | DD | PG | CH | TR | BQ | SF | DB | SV |
SHA1() | Returns the SHA-1 hash of a string as a 40-character hexadecimal string. | DD | PG | CH | TR | BQ | SF | DB | SV |
SHA256() | Returns the SHA-256 hash of a string as a 64-character hexadecimal string. | DD | PG | CH | TR | BQ | SF | DB | SV |
Regex
| Function | Description | Backends |
|---|
REGEX_CONTAINS() | Returns TRUE if the haystack string contains a match for the regular expression pattern (substring... | DD | PG | CH | TR | BQ | SF | DB | SV |
REGEX_MATCH() | Returns TRUE if the entire string matches the regular expression pattern. Unlike REGEX_CONTAINS,... | DD | PG | CH | TR | BQ | SF | DB | SV |
REGEX_EXTRACT_FIRST() | Returns the first substring that matches the pattern, optionally selecting a capture group index (0... | DD | PG | CH | TR | BQ | SF | DB | SV |
REGEX_EXTRACT_ALL() | Returns an array of every non-overlapping substring that matches the pattern, in left-to-right... | DD | PG | CH | TR | BQ | SF | DB | SV |
REGEX_SPLIT() | Splits a string by a regular expression pattern and returns the parts between matches as an array. | DD | PG | CH | TR | BQ | SF | DB | SV |
REGEX_REPLACE_FIRST() | Returns the haystack with the first regular-expression match replaced by the replacement string. | DD | PG | CH | TR | BQ | SF | DB | SV |
REGEX_REPLACE_ALL() | Returns the haystack with every non-overlapping regular-expression match replaced by the... | DD | PG | CH | TR | BQ | SF | DB | SV |
Summary
Functions in this category: 46