Understanding the JSON_SCHEMA_VALIDATION_REPORT() Function in MySQL

In MySQL, the JSON_SCHEMA_VALIDATION_REPORT() function validates a JSON document against a JSON schema and returns a report of the outcome of that validation. The report is returned as a JSON document.

If the document is valid, only one field is returned: "valid" : true. If the document is not valid, a more extensive report is provided.

Continue reading

7 Functions to Format a Number to 2 Decimal Places in MySQL

A common task when working with numbers is to format them to a certain amount of decimal places. Two decimal places seems to be the most common format, but we can format to any number of decimal places we want. MySQL provides us with a number of functions that can help us achieve this.

Below are seven functions that can be used to format a number to two decimal places in MySQL.

Continue reading