MariaDB String Functions
This page lists the string functions in Mariadb that help you to manipulate strings efficiently.
-
ASCII()
In MariaDB,ASCII()
is a built-in string function that returns the ASCII value of the first character of the specified string argument. -
BIN()
In MariaDB,BIN()
is a built-in string function that returns the string representation of the binary value of a given number. -
BIT_LENGTH()
In MariaDB,BIT_LENGTH()
is a built-in string function that returns the number of bits of the given string argument. -
CHAR_LENGTH()
In MariaDB,CHAR_LENGTH()
is a built-in string function that returns the number of characters for a given string argument. -
CHAR()
In MariaDB,CHAR()
is a built-in string function that converts each integer argument to the corresponding character and returns a string consisting of those characters. -
CHARACTER_LENGTH()
In MariaDB,CHARACTER_LENGTH()
is a built-in string function that returns the number of characters for a given string argument. -
CHR()
In MariaDB,CHR()
is a built-in string function, which converts the specified integer parameter into the corresponding character and returns it. -
COMPRESS()
In MariaDB,COMPRESS()
is a built-in function that compresses a string and returns the result as a binary string. -
CONCAT_WS()
In MariaDB,CONCAT_WS()
is a built-in string function that concatenates other string arguments using the specified delimiter and returns the result. -
CONCAT()
In MariaDB,CONCAT()
is a built-in string function that concatenates all argument lists and returns the result. -
ELT()
In MariaDB,ELT()
is a built-in string function that searches for the parameter at the position specified by the first parameter starting from the second parameter and returns it as a string. -
EXPORT_SET()
In MariaDB,EXPORT_SET()
is a built-in string function that generates a string using the specified delimiter based on the bits of the argument. -
FIELD()
In MariaDB, theFIELD()
function returns the position index of a specified value in a given list. -
FIND_IN_SET()
In MariaDB, theFIND_IN_SET()
function returns the index position where the given value occurs in the specified string list. -
FORMAT()
In MariaDB,FORMAT()
is a built-in string function that rounds a given number to a specified number of decimal places -
FROM_BASE64()
In MariaDB,FROM_BASE64()
is a built-in string function that decodes a given base-64 encoded string and returns the result as a binary string. -
HEX()
In MariaDB,HEX()
is a built-in string function that returns a hexadecimal string representation of its argument. -
INSERT()
In MariaDB,INSERT()
is a built-in string function that inserts a given string into another string at a specified position. -
INSTR()
In MariaDB, the built-in stringINSTR()
function returns the index of the first occurrence of a substring within a string. -
LCASE()
In MariaDB,LCASE()
is a built-in string function that converts the given string parameter to lowercase and returns it. -
LEFT()
In MariaDB, theLEFT()
function extracts a given number of characters from the leftmost side of a string and returns them as a string. -
LENGTH()
In MariaDB,LENGTH()
is a built-in string function, it returns the length of the given string in bytes in default mode and returns the characters number of the string in Oracle mode. -
LENGTHB()
In MariaDB,LENGTHB()
is a built-in string function that returns the length of a given string in bytes. -
LOAD_FILE()
In MariaDB, theLOAD_FILE()
function reads a given file and returns the file contents as a string. -
LOCATE()
In MariaDB,LOCATE()
is a built-in string function that returns the index of the first occurrence of a substring within a string. -
LOWER()
In MariaDB,LOWER()
is a built-in string function that converts the given string parameter to lowercase and returns it. -
LPAD()
The MariaDBLPAD()
function left pads the given string to the specified length. -
LTRIM_ORACLE()
In MariaDB,LTRIM_ORACLE()
is a built-in string function that returns a string with all the leading whitespace removed. -
LTRIM()
In MariaDB,LTRIM()
is a built-in string function that returns a string with all the leading whitespaces removed. -
MAKE_SET()
In MariaDB,MAKE_SET()
is a string function that returns a comma-separated string collection,it determines whether other string parameters adds to the result collection by the binary value corresponding to the first parameter. -
MID()
In MariaDB,MID()
is a built-in string function that extracts a substring of a specified length from a string starting from a specified position. -
OCTET_LENGTH()
In MariaDB,OCTET_LENGTH()
is a built-in string function that returns the length in bytes of the given string argument. -
ORD()
In MariaDB,ORD()
is a built-in string function that returns the numeric code of the first character in a string argument. -
POSITION()
In MariaDB,POSITION()
is a built-in string function that returns the position of the first occurrence of a substring within a string. -
QUOTE()
In MariaDB,QUOTE()
is a built-in string function that returns a string enclosed in single quotes so that it is suitable for inclusion in an SQL statement. -
REGEXP_INSTR()
In MariaDB, theREGEXP_INSTR()
function searches a string for a substring that matches the specified pattern and returns the position index of the substring. -
REGEXP_REPLACE()
In MariaDB, theREGEXP_REPLACE()
function replaces a substring matching the specified regular expression with the new content. -
REGEXP_SUBSTR()
In MariaDB, theREGEXP_SUBSTR()
function returns the substring matching the specified regular expression from a string. -
REPEAT()
In MariaDB,REPEAT()
is a built-in string function that repeats the specified string for the specified number of times and returns it. -
REPLACE()
In MariaDB,REPLACE()
is a built-in string function that will replace all occurrences of a substring in a string with a new substring. -
REVERSE()
In MariaDB,REVERSE()
is a built-in string function that reverses the given string and returns it. -
RIGHT()
In MariaDB, theRIGHT()
function extracts a given number of characters from the rightmost part of a string and returns it. -
RPAD()
The MariaDBRPAD()
function right pads the given string to the specified length. -
RTRIM_ORACLE()
In MariaDB,RTRIM_ORACLE()
is a built-in string function that returns a string with all the trailing whitespaces removed. -
RTRIM()
In MariaDB,RTRIM()
is a built-in string function that returns a string with all the trailing whitespaces removed. -
SOUNDEX()
In MariaDB,SOUNDEX()
is a built-in string function that returns a soundex string representing the pronunciation of a given string. -
SOUNDS LIKE
In MariaDB, you can useSOUNDS LIKE
to compare whether two words are pronounced the same. -
SPACE()
In MariaDB,SPACE()
is a built-in string function that returns a string consisting of a specified number of spaces. -
STRCMP()
In MariaDB,STRCMP()
is a built-in string function that compares two strings and returns0
,-1
or1
as the result of the comparison. -
SUBSTR()
In MariaDB,SUBSTR()
is a built-in string function that returns a substring of a specified length from a string starting at a specified position. -
SUBSTRING_INDEX()
In MariaDB,SUBSTRING_INDEX()
is a built-in string function that returns the substring of the specified number of occurrences of the specified delimiter. -
SUBSTRING()
In MariaDB,SUBSTRING()
is a built-in string function that returns a substring of a specified length from a string starting at a specified position. -
TO_BASE64()
In MariaDB,TO_BASE64()
is a built-in string function that converts its string argument to its base-64 encoded form. -
TO_CHAR()
In MariaDB,TO_CHAR()
is a built-in string function that converts a given date/time value to a string in a given format. -
TRIM_ORACLE()
In MariaDB,TRIM_ORACLE()
is a built-in string function that removes the longest string consisting of specified characters from the beginning or end of a specified string. -
TRIM()
In MariaDB,TRIM()
is a built-in string function that removes the longest string consisting of specified characters from the beginning or end of a specified string. -
UCASE()
In MariaDB,UCASE()
is a built-in string function that converts the given string argument to uppercase and returns the result. -
UNCOMPRESS()
In MariaDB,UNCOMPRESS()
is a built-in function that decompresses strings compressed by theCOMPRESS()
function. -
UNCOMPRESSED_LENGTH()
In MariaDB,UNCOMPRESSED_LENGTH()
is a built-in function that returns the length in bytes of a string before being compressed by theCOMPRESS()
function. -
UNHEX()
In MariaDB,UNHEX()
is a built-in string function that converts a string representing a hexadecimal value to bytes and returns the corresponding binary string. -
UPPER()
In MariaDB,UPPER()
is a built-in string function that converts the given string argument to uppercase and returns the result. -
WEIGHT_STRING()
In MariaDB,WEIGHT_STRING()
is a built-in function that returns a binary string representing the comparison and sort weights of the input strings.