sql-的int和varchar类型拼接的问题
将int类型转换为varchar ,如cast(1 as varchar(10)),再进行连接
set @sql =@sql+'update User set Medal='+@count+' where ID='+cast(@ID as varchar(10))+';'
将int类型转换为varchar ,如cast(1 as varchar(10)),再进行连接
set @sql =@sql+'update User set Medal='+@count+' where ID='+cast(@ID as varchar(10))+';'