How can I set a specific bit of a number in Oracle with SQL command?
there is only BITAND operator
BITAND (DEPENDENCY_MAP, 2)
In DEPENDENCY_MAP every bit defines one type dependency.
With this command I can find second bit is seted or not., but how can I modify this bit?
To set the bit:
To clear the bit:
NOTE:
The code above works for positive numbers. I haven’t bothered to figure out what would happen if DEPENDENCY_MAP is a negative number, since I assume you don’t have negative numbers.