Skip to main content

String

Function NameDescription
ASCIIReturns the ASCII code for the first character of a string. If the string is empty, 0 is returned.
BASE64Returns the Base64 encoding of a binary string.
BTRIMTrims leading and trailing characters from a string.
CHARACTER_LENGTHReturns the length of an input string.
CHAR_LENGTHReturns the character length of the input string.
CHRConverts a Unicode code point into the character that matches the input Unicode character. If an invalid code point is specified, an empty string is returned.
COL_LIKETests whether an expression column matches a pattern column. Comparisons are case-sensitive.
CONCATConcatenates two or more strings. NULL values are ignored.
CONCAT_WSConcatenate with separator. Returns a string resulting from the joining of two or more string values in an end-to-end manner. Uses the first argument as the separator between each string.
CRC32Returns a cyclic redundancy check value of a binary string.
ENDS_WITHReturns whether a string ends with another string. The comparison is case-sensitive.
FROM_HEXReturns a binary value for the given hexadecimal string.
HEXReturns the hexadecimal encoding of an expression.
ILIKETests whether an expression matches a pattern. The comparison is case-insensitive.
INITCAPReturns the input string with the first letter of each word in uppercase and the subsequent letters in the word are in lowercase).
INSTRReturns the position of the first occurrence of a string when it is contained in another string. If no such occurrence is found, a zero is returned. The comparison is case-sensitive.
IS_UTF8Returns whether an expression is valid UTF-8
LCASEReturns the input expression with all the characters converted to lowercase.
LEFTReturns the left-most substring. The function name must be enclosed in double quotes ("LEFT").
LENGTHReturns the length of an input string. If the character encoding isn't specified, it assumes to UTF8.
LEVENSHTEINComputes the Levenshtein distance between two input expressions.
LIKETests whether an expression matches one or more patterns. Comparisons are case-sensitive.
LOCATESearches for the first occurrence of the first argument in the second argument and if found, returns the position the of the first argument in the second argument. The first character in a string is position 1. Returns 0 if the substring isn't found in the expression.
LOWERReturns the input expression with all the characters converted to lowercase.
LPADLeft pads a string with spaces or specified characters to reach the number of chracters specified as a parameter.
LTRIMRemoves leading spaces or characters from a string.
MASKReturns a masked version of a string.
MASK_FIRST_NReturns a masked version of a string with the first num_chars characters masked. By default, if you do not provide a mask value, the first four characters are masked.
MASK_HASHReturns a consistent hash value based on the input string. This function returns NULL for non-string types.
MASK_LAST_NReturns a masked version of a string with the last num_chars characters masked. By default, if you do not provide a mask value, the last four characters are masked.
MASK_SHOW_FIRST_NReturns a masked version of a string with the first num_chars characters unmasked. By default, if you do not provide a value, the first four characters are shown.
MASK_SHOW_LAST_NReturns a masked version of a string with the last num_chars characters unmasked. By default, if you do not provide a value, the last four characters are shown.
NORMALIZE_STRINGReturns a normalized string in the specified unicode normalization form.
OCTET_LENGTHReturns the length of the string in bytes.
PARSE_URLReturns the specified part of the URL or the value for the specified QUERY key.
POSITIONReturns the position of the first occurrence of a substring within another string
QUOTEReturns a result that can be used as a properly escaped data value in a SQL statement.
REGEXP_COL_LIKEReturns whether a string matches a regular expression in a column.
REGEXP_EXTRACTExtracts the first string in expression that matches the REGEXP expression and corresponds to the REGEX group index.
REGEXP_LIKEReturns whether a string matches a regular expression.
REGEXP_MATCHESReturns whether a string matches a regular expression.
REGEXP_REPLACEFinds strings that match the given regular expression and replaces the strings with the given string.
REGEXP_SPLITSplits an input string by using a regular expression according to a keyword and an integer value.
REPEATBuilds a string by repeating the input for the specified number of times
REPEATSTRRepeats the given string n times.
REPLACERemoves all occurrences of a specified substring and replaces them with another string.
REVERSEReverses the order of characters in a string.
RIGHTReturns the right-most substring. The function name must be enclosed in double quotes ("RIGHT").
RPADRight pads a string with spaces or specified characters to reach the number of chracters specified as a parameter.
RTRIMRemoves trailing spaces or characters from a string.
SIMILAR_TOTests whether the entire expression matches a pattern.
SOUNDEXReturns a string that contains a phonetic representation of the input string.
SPLIT_PARTSplits a given string at a specified character and returns the requested part.
STARTS_WITHReturns whether a string starts with another string. The comparison is case-sensitive.
STRPOSSearches for the first occurence of the substring in the given expression and returns the position of where the substring begins. Searching binary values is also supported.
ST_FROMGEOHASHReturns the latitude and longitude coordinates of the center of the given geohash.
ST_GEOHASHReturns the corresponding geohash for the given latitude and longitude coordinates.
SUBSTRReturns the portion of the string from the specified base expression starting at the specified characters. This function supports regular expressions.
SUBSTRINGReturns the portion of the string from the specified base expression starting at the specified characters.
SUBSTRING_INDEXReturns a substring of an expression before the specified number of delimiter occurs.
TOASCIIConverts a string that is encoded in the specified character set to UTF-8.
TO_HEXReturns a hexadecimal string for the given binary value.
TRANSLATETranslates the base expression from the source characters/expression to the target characters/expression.
TRIMRemoves leading, trailing, or both spaces or characters from a string.
UCASEReturns the input expression with all the characters converted to uppercase.
UNBASE64Decodes a Base64-encoded string.
UNHEXConverts the hexadecimal number into the bytes represented by a number.
UPPERReturns the input expression with all the characters converted to uppercase.