How to Format the Month in Roman Numerals in Oracle

Oracle Database provides us with the ability to return the month from a date using roman numerals.

For example, if the month is August, its decimal value would be 08 and it’s roman numeral equivalent would be VIII.

The way to do this is to use the RM or rm format element in your format mask. That will format the month using roman numerals in uppercase or lowercase respectively.

Specifying the date format can be done in several places.

Continue reading

How to Return Elements from a JSON Array in MariaDB

MariaDB includes two selectors that enable us to select elements from JSON arrays:

  • [N] selects element number N in the array (for example, [0] to select the first element).
  • [*] selects all elements in the array.

These can be used in a number of JSON functions that are included in MariaDB. The following examples use them with the JSON_EXTRACT() function in order to return selected array elements.

Continue reading