问题:
Consider a database table holding names, with three rows: 考虑一个包含名称的数据库表,该表具有三行:
Peter
Paul
Mary
Is there an easy way to turn this into a single string of Peter, Paul, Mary ? 有没有简单的方法可以将其转换为Peter, Paul, Mary一串文字?
解决方案:
参考一: https://stackoom.com/question/ogm/如何在SQL-Server中将多行文本合并为单个文本字符串参考二: https://oldbug.net/q/ogm/How-to-concatenate-text-from-multiple-rows-into-a-single-text-string-in-SQL-server
来源:oschina
链接:https://my.oschina.net/u/4432649/blog/4470023