其他分享
首页 > 其他分享> > STUFF实现字符拼接

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'

数据

扩展 当需要连表时

标签:24,字符,04,STUFF,拼接,PATH,08,select
来源: https://www.cnblogs.com/yunnn/p/15102547.html