Function
JSON_OBJECT
returns JSON string. It takes comma separated key / value pairs as parameters
INSERT INTO students (
    first_name, 
    last_name, 
    gender, 
    points, 
    document_details
) 
VALUES (
    'Beka', 
    'Gelashvili', 
    '1', 
    '82', 
    JSON_OBJECT('issue_date', "2020-05-25", "expire_date", "2030-05-18", "number", 5)
)
by Valeri Tandilashvili
4 years ago
MySQL
JSON
Full MySQL Course for Beginners
2
Pro tip: use ```triple backticks around text``` to write in code fences