Documentation Home
MySQL HeatWave User Guide
Related Documentation Download this Manual
PDF (US Ltr) - 1.6Mb
PDF (A4) - 1.6Mb


MySQL HeatWave User Guide  /  ...  /  String Functions and Operators

2.12.12 String Functions and Operators

The following table shows supported string functions and operators. With the exception of the FORMAT() function, string functions and operators described in the following table are supported with variable-length encoded columns. Dictionary encoded columns are not supported.

Table 2.12 String Functions and Operators

Name Description
ASCII() Return numeric value of left-most character
BIN() Return a string containing binary representation of a number. Supported as of MySQL 8.2.0.
BIT_LENGTH() Return length of argument in bits. Supported as of MySQL 8.2.0.
CHAR_LENGTH() Return number of characters in argument
CONCAT() Return concatenated string
CONCAT_WS() Return concatenated with separator
ELT() Return string at index number. Supported as of MySQL 8.2.0.
EXPORT_SET()

Return a string such that for every bit set in the value bits, it returns an on string (and for every unset bit, it returns an off string). Supported as of MySQL 8.2.0.

FIELD() Index (position) of first argument in subsequent arguments. Supported as of MySQL 8.2.0.
FIND_IN_SET() Index (position) of first argument within second argument
FORMAT() Return a number formatted to specified number of decimal places. Does not support variable-length-encoded columns.
FROM_BASE64() Decode base64 encoded string and return result
GREATEST()

Return the largest argument. MySQL 8.0.30 includes support for temporal types with the exception of the YEAR data type. MySQL 8.3.0 includes support for the YEAR data type.

HEX() Hexadecimal representation of decimal or string value
INSERT() Return the index of the first occurrence of substring
INSTR() Return the index of the first occurrence of substring
LEAST()

Return the smallest argument. MySQL 8.0.30 includes support for temporal types with the exception of the YEAR data type. MySQL 8.3.0 includes support for the YEAR data type.

LEFT() Return the leftmost number of characters as specified
LENGTH() Return the length of a string in bytes
LIKE Simple pattern matching
LOCATE() Return the position of the first occurrence of substring
LOWER() Return the argument in lowercase
LPAD() Return the string argument, left-padded with the specified string
LTRIM() Remove leading spaces
MAKE_SET() Return a set of comma-separated strings that have the corresponding bit in bits. Supported as of MySQL 8.2.0.
MID() Return a substring starting from the specified position
NOT LIKE Negation of simple pattern matching
OCTET_LENGTH() Synonym for LENGTH()
ORD() Return character code for leftmost character of the argument
POSITION() Synonym for LOCATE()
REPEAT() Repeat a string the specified number of times
QUOTE() Escape the argument for use in an SQL statement
REGEXP Whether string matches regular expression
REGEXP_INSTR() Starting index of substring matching regular expression
REGEXP_LIKE() Whether string matches regular expression
REGEXP_REPLACE() Replace substrings matching regular expression. Supports up to three arguments.
REGEXP_SUBSTR() Return substring matching regular expression. Supports up to three arguments.
REPLACE() Replace occurrences of a specified string
REVERSE() Reverse the characters in a string
RIGHT() Return the specified rightmost number of characters
RLIKE Whether string matches regular expression
RPAD() Append string the specified number of times
RTRIM() Remove trailing spaces
SOUNDEX() Return a soundex string
SPACE() Return a string of the specified number of spaces
STRCMP() Compare two strings
SUBSTR() Return the substring as specified
SUBSTRING() Return the substring as specified
SUBSTRING_INDEX() Return a substring from a string before the specified number of occurrences of the delimiter
TO_BASE64() Return the argument converted to a base-64 string
TRIM() Remove leading and trailing spaces
UNHEX() Return a string containing hex representation of a number
UPPER() Convert to uppercase
WEIGHT_STRING() Return the weight string for a string