I have a table
X
- id
- name (eg: 'testing')
- array_column_name (eg: ["value1","value2"])
I want a query that will return the following output.
_____________________
| column1 | column2 |
| testing | value1 |
| testing | value2 |
|_________|_________|
Essentially what I need is to convert the array to rows.
I tried using
SELECT name, JSON_EXTRACT(@'array_column_name', '*') FROM X;
But I am not sure what to put as the second parameter of the JSON_EXTRACT
since my columns contain a plain array instead array of objects.