Complete the code to create a table with a JSON column named 'data'.
CREATE TABLE users (id INT PRIMARY KEY, data [1]);The JSON data type allows storing JSON documents directly in MySQL.
Complete the query to insert a JSON object into the 'data' column.
INSERT INTO users (id, data) VALUES (1, [1]);
JSON strings must have keys and string values in double quotes.
Fix the error in the query to select the 'name' from the JSON column 'data'.
SELECT data->>[1] FROM users WHERE id = 1;
Use the JSON path '$.name' to extract the 'name' key from JSON.
Fill both blanks to update the 'age' in the JSON column to 31 for user with id 1.
UPDATE users SET data = JSON_SET(data, [1], [2]) WHERE id = 1;
Use JSON_SET with the JSON path '$.age' and the new integer value 31.
Fill all three blanks to select users where the JSON 'age' is greater than 25.
SELECT * FROM users WHERE JSON_EXTRACT(data, [1]) [2] [3];
Use JSON_EXTRACT with '$.age' and compare with > 25 to filter users older than 25.
