Oracle逻辑运算
来源:互联网 发布:淘宝联盟新建推广位 编辑:程序博客网 时间:2024/05/17 08:22
Oracle如何进行逻辑运算:& | ^
oracle提供了UTL_RAW包(utlraw.sql),其中包含几个位运算函数:
BIT_AND、BIT_OR、BIT_XOR、BIT_COMPLEMENT
另外,Oracle7.0以后,可以使用BITAND用于求两个整数的逻辑与,如
SQL> select bitand(49,54)+0 from dual;
BITAND(49,54)+0
---------------
48
根据这个函数可以写出逻辑或与逻辑异或:
function bitor(p_dec1 number, p_dec2 number) return number is
begin
return p_dec1-bitand(p_dec1,p_dec2)+p_dec2;
end;
function bitxor(p_dec1 number, p_dec2 number) return number is
begin
return bitor(p_dec1,p_dec2)-bitand(p_dec1,p_dec2);
-- or you could use: return p_dec1-2*bitand(p_dec1,p_dec2)+p_dec2;
end;
- Oracle逻辑运算
- oracle逻辑运算符优先级
- 逻辑运算
- 逻辑运算
- 逻辑运算
- 逻辑运算
- 逻辑运算
- 逻辑运算
- 逻辑运算
- 逻辑运算
- 逻辑运算
- 逻辑运算
- 逻辑运算
- 逻辑运算
- 逻辑运算
- 逻辑运算
- 逻辑运算
- 逻辑运算
- RTP & RTCP
- 超越“虚拟的美丽”——云计算实践再分析
- 有关javascript的正则表达式的学习
- HOG提取训练检测
- 在C++中通过模板去除强制转换
- Oracle逻辑运算
- 仿腾讯登录验证码
- 应用程序挂起、复原与终止— IOS开发
- 错误1053: 服务没有及时地响应启动或控制请求
- LTE常见系统信息-MIB,SIB
- 网站色彩收藏
- 初识XMPP
- 【PB】不求人一招搞定低版本PB连接高版本SQLServer
- 基于委托机制的(目录)文件遍历