按位异或在甲骨文 [英] bitwise exclusive OR in Oracle
本文介绍了按位异或在甲骨文的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在SQL Server中我一直在使用^符号但是这似乎并没有在甲骨文工作。我该怎么做按位异或甲骨文??
In SQL Server I have been using the ^ symbol however that doesn't seem to work in Oracle. How do I do a bitwise exclusive OR in Oracle??
感谢
推荐答案
从文档:
function bitor(p1 number, p2 number) return number is
begin
return p1-bitand(p1,p2)+p2;
end;
function bitxor(p1 number, p2 number) return number is
begin
return bitor(p1,p2)-bitand(p1,p2);
end;
要看到,这些工作,按照逻辑,只用0和1的输入,再不行,有没有借位或龋齿。
To see that these work, follow the logic with just 0s and 1s for input, and then not that there are no borrow or caries.
- MarkusQ
-- MarkusQ
这篇关于按位异或在甲骨文的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文