webrunner - Tuesday, December 4, 2018 8:30 AM
I suppose MS has implicit cast order documented somewhere. But this inspired me to do some testing. Where @s-2 is varchar and @i is int.
@s-2 += '1' = '11'
@s-2 += 1 = 2
@i += '1' = '11'
@i += 1 = 2
I guess that's a bit intuitive. The type of the rhs value is being used to decide whether + is a string operator or a numeric operator.