赞
踩
新建一张test1表:
执行的脚本如下:
SELECT
a.id,
SUBSTRING_INDEX(
SUBSTRING_INDEX(a.name, ',', b.help_topic_id + 1),
',',
- 1
) NAME
FROM
test1 a
JOIN mysql.help_topic b
ON b.help_topic_id < (
LENGTH(a.name) - LENGTH(REPLACE(a.name, ',', '')) + 1
)
ORDER BY a.id ;
查询结果如图所示:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。