Your Ad Here

Apr 3, 2008

What does this return?

declare @i int
select @i = -5
select +@i-
5
This will return -5 as the result. The + operator functions as a unary plus operator, which means that it performs no operation on the value it preceeds.

No comments: