what will be output of this query?
declare @a int declare @b int set @a=5 set @b=11
select @a=@a^@b,@b=@b^@a,@a=@a^@b
print '@a='+convert(var char, @a)
declare @a int declare @b int set @a=5 set @b=11
select @a=@a^@b,@b=@b^@a,@a=@a^@b
print '@a='+convert(var char, @a)
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Ashutosh TripathiPosted Jul 29, 2015, 1:28 PM
Amitesh VermaPosted Jul 29, 2015, 3:49 AM
Ashutosh TripathiPosted Jul 24, 2015, 2:53 PM
Vignesh ManiPosted Jul 24, 2015, 2:29 PM
select @a=@a^@b,@b=@b^@a,@a=@a^@b
print '@a='+convert(varchar, @a)
print '@b='+convert(varchar,@b)
@b=5