CREATE TABLE `table1` ( `id` int(11) DEFAULT NULL, `name` varchar(255) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
insert into table1 values(1,'yang,zheng,song'); insert into table1 values(2,'zhao,qian,sun'); insert into table1 values(3,'zhou,wu');
![](https://img2018.cnblogs.com/blog/803013/201812/803013-20181225222357823-1551203633.png)
SELECT a.id, substring_index( substring_index( a.name, ',', b.help_topic_id + 1 ), ',',- 1 ) name FROM table1 a JOIN mysql.help_topic b ON b.help_topic_id < ( length( a.name ) - length( REPLACE ( a.name, ',', '' ) ) + 1 ) ORDER BY a.id
![](https://img2018.cnblogs.com/blog/803013/201812/803013-20181225222410160-1853414193.png)