MSSQL-如果结果包含逗号,如何拆分结果?

时间:2019-02-28 15:38:59

标签: sql-server

水果表

ID| FruitList 
1 | Apple, Banana 
2 | Mangoes
3 | Peach, pair, Orange

SQL命令

SELECT DISTINCT [FruitList]
FROM [FRUITS]
*** Logic to return results and split the rows with multiple fruits. ***

示例结果将是

苹果

香蕉

芒果

橙色

0 个答案:

没有答案