Scalar Functions — String
String scalar functions cover manipulation, searching, encoding, parsing, and formatting of text values. ClickHouse and DuckDB have the broadest support. Several functions — including split(), replace_regex(), extract(), and all encoding functions — are unavailable in SQLite.
Legend: ✅ Supported · ⚠️ Approximated · ❌ Not Supported · 🔄 Rewritten
| Function | SQLite | MySQL | ClickHouse | PostgreSQL | DuckDB | Notes |
|---|---|---|---|---|---|---|
strlen() | ✅ | ✅ | ✅ | ✅ | ✅ | length() |
toupper() | ✅ | ✅ | ✅ | ✅ | ✅ | upper() |
tolower() | ✅ | ✅ | ✅ | ✅ | ✅ | lower() |
substring() | ✅ | ✅ | ✅ | ✅ | ✅ | substr(); ClickHouse index offset corrected; DuckDB 0-based (no offset) |
indexof() | ✅ | ✅ | ✅ | ✅ | ✅ | 0-based; occurrence arg not supported with warning |
strcat() | ✅ | ✅ | ✅ | ✅ | ✅ | SQLite/Postgres/DuckDB: ||; MySQL: concat() with NULL warning |
strcat_delim() | ✅ | ✅ | ✅ | ✅ | ✅ | concat_ws() |
strcat_array() | ❌ | ❌ | ✅ | ✅ | ✅ | Postgres/DuckDB: array_to_string; ClickHouse: arrayStringConcat |
split() | ❌ | ❌ | ✅ | ✅ | ✅ | Postgres: string_to_array; DuckDB: string_split; ClickHouse: splitByString |
replace_string() | ✅ | ✅ | ✅ | ✅ | ✅ | replace() |
replace_regex() | ❌ | ✅ | ✅ | ✅ | ✅ | SQLite: unsupported |
reverse() | ❌ | ✅ | ✅ | ✅ | ✅ | SQLite: unsupported (no built-in reversal) |
trim() | ✅ | ✅ | ✅ | ✅ | ✅ | With regex arg: ClickHouse/Postgres/MySQL/DuckDB only (not SQLite) |
trim_start() | ✅ | ✅ | ✅ | ✅ | ✅ | ltrim() / trimLeft() |
trim_end() | ✅ | ✅ | ✅ | ✅ | ✅ | rtrim() / trimRight() |
isempty() | ✅ | ✅ | ✅ | ✅ | ✅ | ClickHouse: isNull OR empty |
isnotempty() | ✅ | ✅ | ✅ | ✅ | ✅ | |
isnull() | ✅ | ✅ | ✅ | ✅ | ✅ | IS NULL |
isnotnull() | ✅ | ✅ | ✅ | ✅ | ✅ | IS NOT NULL |
countof() | ❌ | ❌ | ✅ | ⚠️ | ⚠️ | ClickHouse: countSubstrings(); Postgres/DuckDB: length-delta count — counts non-overlapping matches only (KQL counts overlapping), ignores the kind argument, and an empty needle errors |
strrep() | ❌ | ✅ | ✅ | ✅ | ✅ | repeat() |
strcmp() | ✅ | ✅ | ✅ | ✅ | ✅ | CASE-based −1/0/1 |
extract() | ❌ | ✅ | ✅ | ✅ | ✅ | SQLite: unsupported; DuckDB: regexp_extract |
extract_all() | ❌ | ❌ | ✅ | ❌ | ✅ | ClickHouse: extractAll(); DuckDB: regexp_extract_all() |
translate() | ❌ | ❌ | ✅ | ✅ | ✅ | |
url_encode() | ❌ | ❌ | ✅ | ❌ | ✅ | ClickHouse: encodeURLComponent; DuckDB: url_encode |
url_decode() | ❌ | ❌ | ✅ | ❌ | ✅ | ClickHouse: decodeURLComponent; DuckDB: url_decode |
base64_encode_tostring() | ❌ | ❌ | ✅ | ❌ | ✅ | ClickHouse: base64Encode; DuckDB: base64() (BLOB cast) |
base64_decode_tostring() | ❌ | ❌ | ✅ | ❌ | ✅ | ClickHouse: base64Decode; DuckDB: from_base64 |
parse_json() | ❌ | ✅ | ✅ | ✅ | ✅ | |
parse_url() | ❌ | ❌ | ✅ | ❌ | ✅ | DuckDB: regex-based; Scheme/Host/Port/Path/Query/Fragment only |
parse_urlquery() | ❌ | ❌ | ✅ | ❌ | ✅ | |
normalize_path() | ❌ | ⚠️ | ⚠️ | ⚠️ | ⚠️ | ClickHouse: replaceAll + replaceRegexpAll; Postgres/DuckDB: replace + regexp_replace; MySQL: REPLACE + REGEXP_REPLACE; all with warning |