DECLARE @STR VARCHAR(8000)
SELECT @STR=ISNULL(@STR+‘,‘,‘‘)+weixinuser FROM (SELECT DISTINCT weixinuser FROM v_sysbinduser)AS T
SELECT @STR
declare @output varchar(8000)
select @output = coalesce(@output + ‘,‘ , ‘‘) + weixinuser from v_sysbinduser
print @output
sql 表中列值转成字符串
时间: 2024-12-28 12:42:47