第一种办法:
select '+' + 2
无疑这是错误的:在将 varchar 值 '+' 转换为数值类型 int 时失败
使用 cast
select '+' cast(2 as varchar)
第二种方法:
select (stuff((select '+' + nNum from table for xml path ('')),1,1,'')) //nNum是 int类型
使用 RTRIM
select (stuff((select '+' + RTRIM(nNum) from table for xml path ('')),1,1,'')) //nNum是 int类型