chr

Returns the Unicode code point n as a single character string.

Examples:

examples.sql
select chr(61) as value; -- value '='

Supported Signatures

function chr(bigint) returns varchar

πŸ”— Official Documentation

codepoint

Returns the Unicode code point of the only character of string.

Examples:

examples.sql
SELECT codepoint('😊') AS value; -- value '128522'

Supported Signatures

function codepoint(varchar) returns bigint

πŸ”— Official Documentation

concat

Returns the concatenation of string1, string2, …, stringN. This function provides the same functionality as the SQL-standard concatenation operator (||).

Examples:

examples.sql
select concat('hello ', 'world!') as value; -- value 'hello world!'

Supported Signatures

function concat($3, array<$3>) returns array<$3>
function concat(array<$3>, ...) returns array<$3>
function concat(array<$3>, $3) returns array<$3>
function concat(varchar, varchar) returns varchar
function concat(varchar, ...) returns varchar

πŸ”— Official Documentation

concat_ws

Using the first array string0 element as separator, returns the concatenation of all subsequent strings string1, string2, … If `string0β€œ is null, then the return value is null. Any null values provided in the arguments after the separator are skipped.

Examples:

examples.sql
SELECT concat_ws('😊', 'hey', 'there', 'people') AS value; -- value 'hey😊there😊people'

Supported Signatures

function concat_ws(varchar, array<varchar>) returns varchar
function concat_ws(varchar, ...) returns varchar

πŸ”— Official Documentation

length

Returns the length of string in characters.

Examples:

examples.sql
select length('Hello World!') as value; -- value '12'

Supported Signatures

function length(varchar) returns bigint

πŸ”— Official Documentation

levenshtein_distance

Returns the Levenshtein edit distance of string1 and string2, i.e. the minimum number of single-character edits (insertions, deletions or substitutions) needed to change string1 into string2.

Supported Signatures

function levenshtein_distance(varchar, varchar) returns bigint

πŸ”— Official Documentation

lower

Converts string to lowercase.

Examples:

examples.sql
select lower('Hello World!') as value; -- value 'hello world!'

Supported Signatures

function lower(varchar) returns varchar

πŸ”— Official Documentation

lpad

Left pads string to size characters with padstring. If size is less than the length of string, the result is truncated to size characters. size must not be negative and padstring must be non-empty.

Examples:

examples.sql
select lpad('πŸ˜‰', 5, '*') as value; -- value '****πŸ˜‰'

Supported Signatures

function lpad(varchar, bigint, varchar) returns varchar

πŸ”— Official Documentation

ltrim

Removes leading whitespace from string.

Examples:

examples.sql
select ltrim('   πŸ˜‰') as value; -- value 'πŸ˜‰'

Supported Signatures

function ltrim(varchar) returns varchar

πŸ”— Official Documentation

replace

Removes all instances of search from string.

Examples:

examples.sql
select replace('Hello There', 'There') as value; -- value 'Hello '

Supported Signatures

function replace(varchar, varchar, varchar) returns varchar

πŸ”— Official Documentation

reverse

Returns string with the characters in reverse order.

Examples:

examples.sql
select reverse('Hello There') as value; -- value 'ereht olleH'

Supported Signatures

function reverse(array<$3>) returns array<$3>
function reverse(varchar) returns varchar

πŸ”— Official Documentation

rpad

Right pads string to size characters with padstring. If size is less than the length of string, the result is truncated to size characters. size must not be negative and padstring must be non-empty.

Examples:

examples.sql
select rpad('πŸ˜‰', 5, '*') as value; -- value 'πŸ˜‰****'

Supported Signatures

function rpad(varchar, bigint, varchar) returns varchar

πŸ”— Official Documentation

rtrim

Removes trailing whitespace from string.

Examples:

examples.sql
select rtrim('πŸ˜‰   ') as value; -- value 'πŸ˜‰'

Supported Signatures

function rtrim(varchar) returns varchar

πŸ”— Official Documentation

split

Splits string on delimiter and returns an array.

Examples:

examples.sql
SELECT split('hello+world', '+') as value; -- value '[hello, world]'

Supported Signatures

function split(varchar, varchar) returns array<varchar>
function split(varchar, varchar, bigint) returns array<varchar>

πŸ”— Official Documentation

split_part

Splits string on delimiter and returns the field index. Field indexes start with 1. If the index is larger than the number of fields, then null is returned.

Examples:

examples.sql
SELECT split_part('hello world', 'world', 1) as value; -- value 'hello'

Supported Signatures

function split_part(varchar, varchar, bigint) returns varchar

πŸ”— Official Documentation

starts_with

Tests whether substring is a prefix of string.

Examples:

examples.sql
SELECT starts_with('hello world', 'world') -- value 'false'
SELECT starts_with('hello world', 'hello') ; -- value 'true'

Supported Signatures

function starts_with(varchar, varchar) returns boolean

πŸ”— Official Documentation

strpos

Returns the starting position of the first instance of substring in string. Positions start with 1. If not found, 0 is returned.

Examples:

examples.sql
select strpos('Hello World', 'World') as value; -- value '7'

Supported Signatures

function strpos(varchar, varchar) returns bigint

πŸ”— Official Documentation

substr

This is an alias for substring().

Examples:

examples.sql
select substr('Hello World', 6) as value; -- value ' World'

Supported Signatures

function substr(varchar, bigint) returns varchar
function substr(varchar, bigint, bigint) returns varchar

πŸ”— Official Documentation

substring

Returns the rest of string from the starting position start. Positions start with 1. A negative starting position is interpreted as being relative to the end of the string.

Examples:

examples.sql
select substring('Hello World', 6) as value; -- value ' World'

Supported Signatures

function substring(varchar, bigint) returns varchar
function substring(varchar, bigint, bigint) returns varchar

πŸ”— Official Documentation

translate

Returns the source string translated by replacing characters found in the from string with the corresponding characters in the to string. If the from string contains duplicates, only the first is used. If the source character does not exist in the from string, the source character will be copied without translation. If the index of the matching character in the from string is beyond the length of the to string, the source character will be omitted from the resulting string.

Examples:

examples.sql
select translate('Hello World', 'Hell', 'N') as value; -- value 'No Word'

Supported Signatures

function translate(varchar, varchar, varchar) returns varchar

πŸ”— Official Documentation

trim

Removes any leading and/or trailing characters as specified up to and including string from source.

Examples:

examples.sql
select trim('  πŸ˜‰  ') as value; -- value 'πŸ˜‰'

Supported Signatures

function trim(varchar) returns varchar

πŸ”— Official Documentation

upper

Converts string to uppercase.

Examples:

examples.sql
select upper('Hello World!') as value; -- value 'HELLO WORLD!'

Supported Signatures

function upper(varchar) returns varchar

πŸ”— Official Documentation