You won’t need them very often but it might be good to know that they’re there. Here’s an example of how to use a bitwise AND in a where clause:
SELECT * FROM uppdrag WHERE (applikationer & 1) > 0
In this example, ‘applikationer’ is a column containing several combined flags and we want to check the setting on the flag in the lowest bit.
The bitwise operators are:
- & – bitwise AND
- | – bitwise OR
- ^ – bitwise EXCLUSIVE OR