Oracle bitand( )函数简介

数据库 Oracle
在Oracle数据库中,bitand( )函数返回两个数值型数值在按位进行AND运算后的结果,下面就让我们一起来了解一下Oracle bitand( )函数的语法。

Oracle bitand( )函数在Oracle数据库中是很常见的,下面就为您详细介绍Oracle bitand( )函数的用法,如果您感兴趣的话,不妨一看。

Oracle bitand( )函数:

返回两个数值型数值在按位进行AND 运算后的结果。
语法
BITAND(nExpression1, nExpression2)
参数
nExpression1, nExpression2
 
指定按位进行AND 运算的两个数值。如果 nExpression1 和 nExpression2 为非整数型,那么它们在按位进行 AND 运算之前转换为整数。
 
Oracle bitand( )函数返回值类型:
数值型
 
说明
BITAND( ) 将 nExpression1 的每一位同 nExpression2 的相应位进行比较。如果 nExpression1 和 nExpression2 的位都是 1,相应的结果位就是 1;否则相应的结果位是 0。

下表列出对 nExpression1 和 nExpression2 按位进行 AND 运算的结果:
 
nExpression1 位 nExpression2 位 结果位 
0 0 0 
0 1 0 
1 1 1 
1 0 0 
bitand( ) 函数示例
x = 5&& 二进制为 0101
y = 6&& 二进制为 0110
? bitand(x,y) && 返回值 4,二进制为 0100

-----------------------------------------------------------------------------

以上就是Oracle bitand( )函数的语法介绍。

 

 

【编辑推荐】

oracle聚合函数的使用

计算时间差的Oracle函数

oracle自定义函数的使用

Oracle TRIM函数语法介绍

Oracle日期函数简介

责任编辑:段燃 来源: 互联网
相关推荐

2010-10-25 15:12:42

Oracle日期函数

2011-04-12 13:27:09

Oracle日期函数

2010-10-25 17:39:24

Oracle单行日期函

2010-10-25 14:47:49

Oracle系统变量函

2010-04-27 12:51:49

Oracle 函数de

2010-04-01 09:34:06

Oracle函数

2009-11-18 16:43:59

2009-11-19 11:00:55

Oracle xmlt

2010-10-28 10:54:46

oracle对象权限

2009-11-16 11:03:44

Oracle INDE

2010-11-15 12:02:24

Oracle进程结构

2010-11-19 16:03:20

Oracle分析表

2010-04-07 15:47:32

Oracle 11g

2015-08-21 12:59:38

Oracle数据库

2010-11-18 13:09:19

Oracle case

2023-10-11 06:50:32

Oracle数据库系统

2010-10-26 11:39:51

Oracle EXPIMP备份

2010-10-26 17:41:05

Oracle索引

2009-11-11 13:51:23

VS DisplayI

2010-10-11 16:19:30

Mysql聚合函数
点赞
收藏

51CTO技术栈公众号