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.

Continue reading

How CONCAT_WS() Works in MariaDB

In MariaDB, CONCAT_WS() is a built-in string function that stands for Concatenate With Separator.

CONCAT_WS() performs a string concatenation on its arguments, with the first argument being the separator for the remaining arguments.

Concatenation is the operation of joining two or more strings end-to-end.

CONCAT_WS() accepts two or more arguments (although providing just two arguments would result in nothing being concatenated, due to the first argument being the separator, and the second being a single string to be concatenated with… nothing else).

Continue reading