sathish

sathish

  • 0
  • 184
  • 0

Use of ‘&’ in sql

May 9 2019 9:03 AM
Hi,
 
The below code prints A as output, but when doing vice-versa as @A=7 and @B=4 its not working.. kindly let me know what '&' operator does to validate
 
DECLARE @A int
DECLARE @B int
set @A=4
set @B=7
if @A&@B=@A
print 'A' 
 
Thanks
Sathish 

Answers (3)