【mysql】行转列的sql

SELECT substring_index(substring_index(t.context,',', b.help_topic_id + 1), ',', -1) FROM test.test t join mysql.help_topic b ON b.help_topic_id <  (LENGTH(t.context) - LENGTH(REPLACE(t.context, ',', '')) + 1);

  

posted @ 2019-01-28 15:58  Frankiee  阅读(411)  评论(0)    收藏  举报