In MySQL, the CEILING()
function allows you to round a number up to the nearest integer. More specifically, it returns the smallest integer not less than its argument.
You can also use the CEIL()
function, which is a synonym for CEILING()
.
In MySQL, the CEILING()
function allows you to round a number up to the nearest integer. More specifically, it returns the smallest integer not less than its argument.
You can also use the CEIL()
function, which is a synonym for CEILING()
.
In MySQL, the FLOOR()
function allows you to round a number down to the nearest integer. More specifically, it returns the largest integer not larger than its argument.
In MySQL, the JSON_LENGTH()
function returns the length of a JSON document.
When you call this function, you provide the JSON document as an argument. You can also provide a path argument to return the length of a value within the document.
In MySQL, the JSON_DEPTH()
function returns the maximum depth of a JSON document.
When you call this function, you provide the JSON document as an argument.
In MySQL, the JSON_TYPE()
function returns the type of a JSON value. More specifically, it returns a utf8mb4
 string indicating the value’s type.
You provide the JSON value as an argument.
In MySQL, the JSON_STORAGE_FREE()
function shows how much storage space was freed up after a JSON Document was updated.
For a JSON column value, it shows how much storage space was freed in its binary representation after it was updated in place using JSON_SET()
, JSON_REPLACE()
, or JSON_REMOVE()
.
For a JSON document (or a string which can be parsed as one), this function returns 0
.
In MySQL, the JSON_STORAGE_SIZE()
function returns the number of bytes used to store the binary representation of a JSON document.
You provide the JSON document as an argument.
When the argument is a JSON
column, this function returns the space used to store the JSON document as it was inserted into the column, prior to any partial updates that may have been performed on it afterwards.
When the argument is a string, the function returns the amount of storage space in the JSON binary representation that is created by parsing the string as JSON and converting it to binary.
In MySQL, the JSON_PRETTY()
function provides pretty-printing of JSON values. It returns the JSON values in a nicely formatted way, which makes it easier for us humans to read.
You provide the JSON values as an argument to the function. The function then returns those values formatted according to its formatting rules.
In MySQL, the JSON_SEARCH()
function returns the path to a given string in a JSON document.
You provide the JSON document as an argument to the function. You also provide the argument that determines the actual string to search (including any escape characters), as well as a keyword to indicate whether to return the path of all instances or just one.
In MySQL, the JSON_KEYS()
function returns keys from the top level value of a JSON object. The keys are returned as a JSON array, or, if a path
 argument is given, the top-level keys from the selected path.
You provide the JSON document as an argument to the function.
You can also (optionally) provide a second argument to specify where the “top-level” path starts from within the JSON document.