时间:2021-07-01 10:21:17 帮助过:17人阅读
相当于从第几个字符开始,替换掉几个字符成后面的
实例2、SQL 将列转成字符串并用逗号分隔
SELECT STUFF((SELECT ‘,‘ + FieldName FROM TableName FOR XML PATH(‘‘)),1,1,‘‘) AS T
SQL实现代码
select patientid,plusid=(STUFF((select ‘,‘ + plusid from test a where a.patientid=b.patientid for xml path(‘‘)),1,1,‘‘)) from test b group by patientid
sql stuff函数的语法和作用
标签:HERE 数据类型 from ble expr 返回 test 产生 支持