Skip to main content

Scalar Functions — String

String scalar functions cover manipulation, searching, encoding, parsing, and formatting of text values. ClickHouse has the broadest support. Several functions — including split(), replace_regex(), extract(), and all encoding functions — are unavailable in SQLite.

Legend: ✅ Supported · ⚠️ Approximated · ❌ Not Supported · 🔄 Rewritten

FunctionSQLiteMySQLClickHousePostgreSQLNotes
strlen()length()
toupper()upper()
tolower()lower()
substring()substr(); ClickHouse index offset corrected
indexof()0-based; occurrence arg not supported with warning
strcat()SQLite/Postgres: ||; MySQL: concat() with NULL warning
strcat_delim()concat_ws() / concatWs()
strcat_array()
split()Postgres: string_to_array; ClickHouse: splitByString
replace_string()replace()
replace_regex()SQLite: unsupported
reverse()
trim()With regex arg: ClickHouse/Postgres/MySQL only
trim_start()ltrim() / trimLeft()
trim_end()rtrim() / trimRight()
isempty()ClickHouse: isNull OR empty
isnotempty()
isnull()IS NULL
isnotnull()IS NOT NULL
countof()ClickHouse: countSubstrings()
strrep()repeat()
strcmp()
extract()SQLite: unsupported
extract_all()ClickHouse: extractAll()
translate()
url_encode()ClickHouse: encodeURLComponent
url_decode()ClickHouse: decodeURLComponent
base64_encode_tostring()ClickHouse: base64Encode
base64_decode_tostring()ClickHouse: base64Decode
parse_json()
parse_url()
parse_urlquery()
normalize_path()⚠️⚠️⚠️ClickHouse: replaceAll + replaceRegexpAll; Postgres: replace + regexp_replace; MySQL: REPLACE + REGEXP_REPLACE; all with warning