the regular automatic type conversion applying to JSON data in MySQL. A missing value triggers the on_empty  clause. Saving an object or array triggers the optional on error  clause; this also occurs when an error takes place during coercion from the value saved as JSON to the table column, such as trying to save the string ’asd’  to an integer column. 

3. name type  EXISTS PATH path : This column returns 1 if any data is present at the location specified by path , and 0 otherwise. type  can be any valid MySQL data type, but should normally be specified as some variety of INT . 

4. NESTED [PATH] path  COLUMNS ( column_list ) : This flattens nested objects or arrays in JSON data into a single row along with the JSON values from the parent object or array. Using multiple PATH  options allows projection of JSON values from multiple levels of nesting into a single row. 

The path  is relative to the parent path row path of JSON_TABLE() , or the path of the parent NESTED [PATH]  clause in the event of nested paths. 

on empty , if specified, determines what JSON_TABLE()  does in the event that data is missing (depending on type). This clause is also triggered on a column in a NESTED PATH  clause when the latter has no match and a NULL  complemented row is produced for it. on empty  takes one of the following values: 

• NULL ON EMPTY : The column is set to NULL ; this is the default behavior. 

• DEFAULT json_string  ON EMPTY : the provided json_string  is parsed as JSON, as long as it is valid, and stored instead of the missing value. Column type rules also apply to the default value. 

• ERROR ON EMPTY : An error is thrown. 

If used, on_error  takes one of the following values with the corresponding result as shown here: 

• NULL ON ERROR : The column is set to NULL ; this is the default behavior. 

• DEFAULT json string  ON ERROR : The json_string  is parsed as JSON (provided that it is valid) and stored instead of the object or array. 

• ERROR ON ERROR : An error is thrown. 

Prior to MySQL 8.0.20, a warning was thrown if a type conversion error occurred with NULL ON ERROR or DEFAULT ... ON ERROR  was specified or implied. In MySQL 8.0.20 and later, this is no longer the case. (Bug #30628330) 

Previously, it was possible to specify ON EMPTY  and ON ERROR  clauses in either order. This runs counter to the SQL standard, which stipulates that ON EMPTY , if specified, must precede any ON ERROR clause. For this reason, beginning with MySQL 8.0.20, specifying ON ERROR  before ON EMPTY  is 

