{NULL | ERROR | DEFAULT value } ON ERROR 

json_doc  is a valid JSON document. 

path  is a JSON path pointing to a location in the document. This must be a string literal value. 

type  is one of the following data types: 

• FLOAT 

• DOUBLE 

• DECIMAL 

• SIGNED 

• UNSIGNED 

• DATE 

• TIME 

• DATETIME 

• YEAR  (MySQL 8.0.22 and later) 

YEAR  values of one or two digits are not supported. 

• CHAR 

• JSON 

The types just listed are the same as the (non-array) types supported by the CAST()  function. 

If not specified by a RETURNING  clause, the JSON_VALUE()  function’s return type is VARCHAR(512) . When no character set is specified for the return type, JSON_VALUE()  uses utf8mb4  with the binary 

