This article contains a full list of built-in MariaDB string functions and operators.
Continue readingTag: string functions
Difference Between TRIM() and TRIM_ORACLE() in MariaDB
MariaDB has a TRIM()
function and a TRIM_ORACLE()
function. Both functions do essentially the same thing. But there is a minor difference.
How TO_CHAR() Works in MariaDB
In MariaDB, TO_CHAR()
is a built-in string function that converts a date/time expression to a string.
The expression can be a date, datetime, time, or timestamp value.
This function was introduced in MariaDB 10.6.1 to enhance Oracle compatibility.
Continue readingReplace a String with another String in SQL Server (T-SQL)
In SQL Server you can use the REPLACE()
function to replace all occurrences of a string with another string.
The function accepts three arguments; the string that contains the string to be replaced, the string to be replaced, and the string to replace it.
Continue readingInsert Characters into the Middle of a String in SQL Server (T-SQL)
SQL Server provides the STUFF()
function that enables you to insert a string inside another string.
The function also allows you to specify the number of characters (if any) to delete from the original string in order to fit the new string.
Continue readingHow REGEXP_REPLACE() Works in MariaDB
In MariaDB, the REGEXP_REPLACE()
function replaces occurrences of the substring within a string that matches the given regular expression pattern.
The whole string is returned along with the replacements.
If there’s no match (i.e. the input string doesn’t contain the substring), the the whole string is returned unchanged.
Continue readingHow REGEXP_SUBSTR() Works in MariaDB
In MariaDB, the REGEXP_SUBSTR()
function returns the substring that matches the given regular expression pattern.
If there’s no match (i.e. the input string doesn’t contain the substring), the result is an empty string.
Continue readingHow REGEXP_INSTR() Works in MariaDB
In MariaDB, the REGEXP_INSTR()
function returns the starting index of a substring that matches the regular expression pattern.
The index starts at 1
. If there’s no match, the result is 0
.
How NOT RLIKE Works in MariaDB
In MariaDB, NOT RLIKE
is a negation of the RLIKE
operator.
In other words, any time the RLIKE
operator would return 1
, NOT RLIKE
will return 0
.
How RLIKE Works in MariaDB
In MariaDB, the RLIKE
operator is used to determine whether or not a string matches a regular expression. It’s a synonym for REGEXP
.
If the string matches the regular expression provided, the result is 1
, otherwise it’s 0
.