sqlserver中怎么将一列数据拼接成一个字符串
SELECT b.name +',' FROM dbo.TechnologyColor a join [dbo].[CustomColor] b on a.customcolorid=b.id WHERE ProductId=345882800324677 FOR xml PATH('')
SELECT 需要合并的字段+',' FROM 表名 FOR XML PATH('')
SELECT b.name +',' FROM dbo.TechnologyColor a join [dbo].[CustomColor] b on a.customcolorid=b.id WHERE ProductId=345882800324677 FOR xml PATH('')
SELECT 需要合并的字段+',' FROM 表名 FOR XML PATH('')