STUFF实现字符拼接

示例

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实现字符拼接

上一篇:gitignore文件


下一篇:较全的gitignore模板(学习过程记录)