For example 10 = 2+8 = 2^1 + 2^3
In the query, How can I select it when I want the code contains 2^1 or 2^3
?
For example 10 = 2+8 = 2^1 + 2^3
In the query, How can I select it when I want the code contains 2^1 or 2^3
?
You can try:
where (10 & (1 << 1) ) > 0 or (10 & (1 << 3)) > 0
Or, as a single operator:
where 10 & ( (1 << 1) | (1 << 3) ) > 0