create table temp_1 as
SELECT a.appid
, a.`NAME`
, substring_index(substring_index(a.`NAME`, ',', b.help_topic_id + 1), ',', - 1) AS xinming
FROM temp a
INNER JOIN mysql.help_topic b
ON b.help_topic_id < (length(a.`NAME`) - length(REPLACE(a.`NAME`, ',', '')) + 1);
mysql中动态行转列
2024-04-03 03:14:01 19 阅读