示例

select STUFF((select '、' + name from zz FOR XML PATH('')),1,1,'')

运用

 select STUFF((select '、' +  title from SafeOperationLicenseRecord where c_createtime>'2021-08-04 10:24:48.377' FOR XML PATH('')),1,1,'')
 select title from SafeOperationLicenseRecord where c_createtime>'2021-08-04 10:24:48.377'

数据

STUFF实现字符拼接_数据

扩展 当需要连表时

STUFF实现字符拼接_xml_02