MariaDB provides several ways to perform arithmetic on dates. This includes adding or subtracting a day (or many days) from a given date.
Here’s an example of subtracting a day from a date in MariaDB.
Continue readingMariaDB provides several ways to perform arithmetic on dates. This includes adding or subtracting a day (or many days) from a given date.
Here’s an example of subtracting a day from a date in MariaDB.
Continue readingIf you need to find the collations that are available in your MariaDB installation, check out the following three methods.
Continue readingWhen working with JSON in MariaDB, you can use JSONPath expressions to manipulate data within a JSON document.
One powerful feature that MariaDB provides is the wildcard step (**
). This allows you to recursively select all child elements of the current element.
The wildcard step is a non-standard extension, and it’s also supported with the same meaning in MySQL.
Continue readingMariaDB has a lc_time_names
system variable that controls the language used by the DAYNAME()
, MONTHNAME()
and DATE_FORMAT()
date and time functions.
Here’s how to set the value of that variable.
Continue readingBelow are 4 functions that enable you to return the month from a date in MariaDB.
Continue readingYou can specify the character set and collation at various levels in MariaDB. You can specify them at the connection level, the server level, the database level, the table level, and even the column level.
You can also specify a collation in your queries so that it overrides any collation that has been previously specified at the aforementioned levels.
Continue readingIn SQL, the columns
information schema view, which returns information about columns, is an ISO standard view that is supported by most of the major RDBMSs. You can use this view to get information about a column’s data type.
Most of the major RDBMs also provide other methods for getting column information.
Here are examples of getting the data type of a column in various SQL databases.
Continue readingThe following MariaDB examples return only those rows that have numeric values in a given column.
These examples use the REGEXP
function to return values that match the specified pattern.
If you ever need to find out which quarter a date belongs to in MariaDB, here are two functions that will allow you to do just that.
Continue readingIf you need to find the character sets that are available in your MariaDB installation, check out the following two methods.
Continue reading