I have a table in MySQL with a column with json like this
id col
1 [{"key": 1, "value": 9}, {"key": 2, "value": 8}, {"key": 3, "value": 7}, ...]
2 [{"key": 1, "value": 6}, {"key": 2, "value": 5}, {"key": 3, "value": 4}, ...]
...
I need to transform it in
id key value
1 1 9
1 2 8
1 3 7
2 1 6
2 2 5
2 3 4
Because of company and server, I cannot create temporary table. Also I cannot use JSON_TABLE
. It should be in one query. Is there any solution? OR I should update mysql to version 8?