In MariaDB, LENGTH()
is a built-in string function that returns the length of the given string argument.
When in default mode, the length of the string is measured in bytes. But when in Oracle mode, it’s measured in characters.
Continue readingIn MariaDB, LENGTH()
is a built-in string function that returns the length of the given string argument.
When in default mode, the length of the string is measured in bytes. But when in Oracle mode, it’s measured in characters.
Continue readingIn MariaDB, CHARACTER_LENGTH()
is a built-in string function that returns the length of the given string argument, measured in characters.
CHARACTER_LENGTH()
is actually a synonym for CHAR_LENGTH()
, so you can use either.
In MariaDB, CHAR_LENGTH()
is a built-in string function that returns the length of the given string argument, measured in characters.
In MariaDB, CONVERT()
is a built in function that converts a value to another data type. It takes a value of one type and returns a value of the specified type.
You provide the value as an argument when you call the function, as well as the type that you’d like it converted to.
CONVERT()
is similar to CAST()
.
In MariaDB, CAST()
is a built in function that converts a value to another data type. It takes a value of one type and returns a value of the specified type.
You provide the value as an argument when you call the function, as well as the type that you’d like it converted to.
CAST()
works similar to CONVERT()
.
In MariaDB, CHARSET()
is a secondary built in function that returns the character set of a given string.
We provide the string when we call the function.
Continue readingIn MariaDB, the BINARY
operator casts the string following it to a binary string.
The BINARY
operator enables you to do a column comparison byte by byte rather than character by character. This causes the comparison to be case sensitive even if the column isn’t defined as BINARY
or BLOB
. It also means that leading/trailing spaces become significant.
In MariaDB, BIT_LENGTH()
is a built in string function that returns the length of the given string argument in bits.
You provide the string as an argument when you call the function.
Continue readingIn MariaDB, BIN()
is a built in string function that returns a string representation of the binary value of the given longlong (i.e. BIGINT
) number.
You provide the longlong number when you call the function.
Continue readingIn MariaDB, you can use the SHOW CHARACTER SET
administrative SQL statement to return all available character sets in MariaDB.