What is the use of "&" operator in SQL SERVER
What is the use of & operator in the code specified below. IS there any benefit of using & instead of "AND". Please elaborate.
CASE ( C.[Status] & F.[Status] & D.[Status] & DWT.[Status] & P.[Status] )
WHEN 1
THEN CASE ( C.IsDeleted & F.IsDeleted & D.IsDeleted & P.IsDeleted )
WHEN 0 THEN N开发者_开发知识库ULL
ELSE 7
END
ELSE 6
END
&
is bit AND operation:
&
Bitwise AND|
Bitwise OR^
Bitwise exclusive OR~
Bitwise NOT
Bitwise AND operation, take a look at & (Bitwise AND) (Transact-SQL) in Books On Line
It's a bitwise operator - AND
http://msdn.microsoft.com/en-us/library/ms176122.aspx
精彩评论