根据MySQL表中以逗号分隔的字符串创建新结果集

时间:2018-08-06 21:26:51

标签: mysql

我正在使用5.6 MySQL表,并具有以下数据:

数据

id      name        mobile_platform 
1       birds       iOS,Android,Windows
2       bees        iOS,Windows
3       donkeys     Windows

我想得到以下信息(即在移动平台上以逗号分隔并生成新的结果行):

结果

id      name        mobile_platform
1       birds       iOS
1       birds       Android
1       birds       Windows
2       bees        iOS
2       bees        Windows
3       donkeys     Windows

如何查询此结果?

0 个答案:

没有答案