Question: How do you bitor with
SQL in Oracle?
Answer: You use the SQL
bitand operator as a permutation to create a bitor
example. The formula for bitor is as
follows:
bitor = sum (x + y - bitand(x, y))
Hence, here is a simple example of a
bitor, using a bitand:
select
sum(12+11-bitand(12,11)) bitor
from dual;
BITOR
-----------
15
The math behind the bitor is like this:
1100 = "12"
1011 = "11"
==== bitor
1111 =
"15"
|
|
Get the Complete
Oracle SQL Tuning Information
The landmark book
"Advanced Oracle
SQL Tuning The Definitive Reference" is
filled with valuable information on Oracle SQL Tuning.
This book includes scripts and tools to hypercharge Oracle 11g
performance and you can
buy it
for 30% off directly from the publisher.
|