In MariaDB, the LOAD_FILE()
function reads a file and returns the file contents as a string.
Category: MariaDB
How RPAD() Works in MariaDB
In MariaDB, RPAD()
is a built-in string function that pads the right part of a string with a certain number of a specified character.
For example, you can use RPAD()
to pad the right part of a string with dots.
How LPAD() Works in MariaDB
In MariaDB, LPAD()
is a built-in string function that pads the left part of a string with a certain number of characters.
For example, you can use LPAD()
to pad the left part of a string with spaces. Or you could pad a number with leading zeros.
How the LIKE Operator Works in MariaDB
In MariaDB, the LIKE
operator allows you to do pattern matching. It determines whether a specific character string matches a specified pattern. It returns either 1
(TRUE) or 0
(FALSE).
How NOT LIKE Works in MariaDB
In MariaDB, the NOT LIKE
operator is used to test whether or not a string does not match a pattern. It returns the inverse of the LIKE
operator. It’s the same as applying the NOT
operator against the whole LIKE
expression.
How RIGHT() Works in MariaDB
In MariaDB, RIGHT()
is a built-in string function that returns a given number of characters from the rightmost part of a string.
RIGHT()
accepts two arguments; the string, and the number of characters to return from the right part of that string.
MariaDB UCASE() Explained
In MariaDB, UCASE()
is a built-in string function that returns its string argument with all characters changed to uppercase.
The result is returned in the current character set mapping. The default is latin1
(cp1252 West European).
UCASE()
is a synonym for UPPER()
.
How UPPER() Works in MariaDB
In MariaDB, UPPER()
is a built-in string function that returns its string argument with all characters changed to uppercase.
The result is returned in the current character set mapping. The default is latin1
(cp1252 West European).
Another MariaDB function, UCASE()
is a synonym for UPPER()
.
MariaDB LCASE() Explained
In MariaDB, LCASE()
is a built-in string function that returns its string argument with all characters changed to lowercase.
The result is returned in the current character set mapping. The default is latin1
(cp1252 West European).
LCASE()
is a synonym for LOWER()
.
How to Truncate Text with an Ellipsis in MariaDB
Sometimes you might find that the amount of text returned in a database column is too long. You might just want to return a short snippet of that text, followed by an ellipsis or three dots.
Fortunately, this is relatively easy to do in MariaDB.
Continue reading