I have a database table. There are quiz questions and 40 thousand records.
In the table; There are columns id, questionid, question, answer a, answer b, answer c, answer d and correct answer.
Now I want to do this: divide it into two tables: questions and answers.
Questions table; It must consist of id and question.
Answer table; It should be in the form of id, question ID, answer and correct answer. However, in the old record there are 4 lines for each question answer and it should be the same in this one too.
Example;
Questions table:
|id|question
answer table:
|id|1|a|0
|id|1|b|0
|id|1|c|1
|id|1|d|0
How can I achieve this in the easiest way for 40 thousand questions?
I created a json file, but I could not split the answers line by line.
1