-1

I have grouped values using GROUP_CONCAT() and now, I would like to unnest them into separate rows. I cannot use UNNEST() in MySQL as far as I am aware. How can I go about solving this?

The current version of the table:

Id Grouped_column
1 A, B, C
2 A, D

A desired version of the table:

Id Grouped_column Unnested_column
1 A, B, C A
1 A, B, C B
1 A, B, C C
2 A, D A
2 A, D D
Norah Jones
  • 407
  • 2
  • 14
  • `MySQL` doesn't have split string, check the answers in this solution for the dynamic string split https://stackoverflow.com/questions/11835155/mysql-split-comma-separated-string-into-temp-table – Ergest Basha May 26 '22 at 15:49

0 Answers0