Split string into row
I am using MySQL. I have a table named " class ", the " class " table has three columns name , year and class_code like following: Class table: Now I would like to use the above table to create a new table named " temp ", which contains class_code and value columns. The rule is that each string value in each column field of a row of the above " class " table will be split into words, and each word will be inserted to the " temp " table as value column of a temp table record like following: temp table: I am using MySQL. Is it possible to generate the " temp " table purely by using SQL statement