In Oracle Database, the JSON_ARRAY() function creates a JSON array from a sequence of SQL scalar expressions or one collection type instance, VARRAY or NESTED TABLE.
json
JSON_TABLE() Function in Oracle
In Oracle Database, the JSON_TABLE() function creates a relational view of JSON data. It allows you to present the values in a JSON document in table format – as rows and columns.
JSON_VALUE() Function in Oracle
In Oracle Database, the JSON_VALUE() function finds a specified scalar JSON value in JSON data and returns it as a SQL value.
JSON_QUERY() Function in Oracle
In Oracle Database, the JSON_QUERY() function selects and returns one or more values from JSON data and returns those values.
You can use the function to retrieve fragments of a JSON document.
MariaDB JSON_VALUE() vs JSON_QUERY(): What’s the Difference?
In MariaDB, the JSON_VALUE() function and JSON_QUERY() function do similar things – they return data from a JSON document.
So what’s the difference?
The main difference is that JSON_VALUE() returns scalar values, whereas JSON_QUERY() returns arrays and objects.
MariaDB JSON Functions
Below is a list of the JSON functions available in MariaDB.
MariaDB JSON_VALID() Explained
In MariaDB, JSON_VALID() is a built-in function that allows you to check whether or not a value is a valid JSON document.
You pass the value as an argument, and JSON_VALID() returns 1 if it’s a valid JSON document, and 0 if not.
MariaDB JSON_UNQUOTE() Explained
In MariaDB, JSON_UNQUOTE() is a built-in function that removes quotes from a JSON value. In other words, it “unquotes” a JSON value.
MariaDB JSON_TYPE() Explained
In MariaDB, JSON_TYPE() is a built-in function that returns the type of a JSON value, as a string.
MariaDB JSON_SEARCH() Explained
In MariaDB, JSON_SEARCH() is a built-in function that allows you to get the path to a given value in a JSON document.
It accepts the JSON document and a string as arguments, and returns the path to the given string within the document.