What are bitwise operators and what is the value from a database design perspective?

Technology CommunityCategory: T-SQLWhat are bitwise operators and what is the value from a database design perspective?
VietMX Staff asked 3 years ago
  • The bitwise operators in SQL Server are:
    • & (Bitwise AND)
    • ~ (Bitwise NOT)
    • | (Bitwise OR)
    • ^ (Bitwise Exclusive OR)
  • From a database design perspective, bitwise operators can be used to store a complex set of criteria as a single value as opposed to having numerous lookup tables or numerous columns used as a ‘flag’ or condition indicator.