What is the use of "&" operator in SQL SERVER -


what use of & operator in code specified below. there benefit of using & instead of "and". please elaborate.

case ( c.[status] & f.[status] & d.[status] & dwt.[status] & p.[status] )     when 1         case ( c.isdeleted & f.isdeleted & d.isdeleted & p.isdeleted )         when 0 null         else 7         end     else 6 end 

& bit , operation:

  • & bitwise and

  • | bitwise or

  • ^ bitwise exclusive or

  • ~ bitwise not


Comments