How LOCATE() Works in MariaDB

In MariaDB, LOCATE() is a built-in string function that returns the position of the first occurrence of a substring within another string.

LOCATE() is similar to the INSTR() function, except that LOCATE() provides the option of specifying a starting position for the search. Also, the argument order is reversed between these two functions.

Read more

How INSTR() Works in MariaDB

In MariaDB, INSTR() is a built-in string function that returns the position of the first occurrence of a substring within another string.

INSTR() is similar to the LOCATE() function, except that LOCATE() provides the option of specifying a starting position for the search. Also, the argument order is reversed between these two functions.

Read more

How UNHEX() Works in MariaDB

In MariaDB, UNHEX() is a built-in string function that performs the inverse operation of the HEX() function.

Whereas, the HEX() function returns a hexadecimal representation of a given string, the UNHEX() function returns the string representation of a given hexadecimal value.

Specifically, UNHEX() interprets each pair of hexadecimal digits in its argument as a number, and then converts it to the character represented by the number.

The result is returned as a binary string.

Read more

How EXPORT_SET() Works in MariaDB

In MariaDB, EXPORT_SET() is a built-in string function that returns a string that reflects the bits in the specified value. For every bit set in the specified value, you get an “on” string and for every bit not set in the value, you get an “off” string.

It accepts a minimum of three arguments, plus two optional arguments.

Read more

How FIND_IN_SET() Works in MariaDB

In MariaDB, FIND_IN_SET() is a built-in string function that returns the index position where the given pattern occurs in the specified string list.

It accepts two arguments. The first is the pattern you want to search for. The second argument is a string containing comma-separated values for which to match the pattern against.

Read more