在oracle中在两个整型值之间执行按位逻辑与运算的运算符是什么?类似sql中的&

如题。
在线等!
---------------------------------------------------------------

maybe:

12:55:30 jlanzpa817>select utl_raw.bit_and(hextoraw(1),hextoraw(2)) from dual;

UTL_RAW.BIT_AND(HEXTORAW(1),HEXTORAW(2))
-------------------------------------------------------------------------------
00

已用时间: 00: 00: 00.51
12:58:22 jlanzpa817>select utl_raw.bit_and(hextoraw(1),hextoraw(3)) from dual;

UTL_RAW.BIT_AND(HEXTORAW(1),HEXTORAW(3))
-------------------------------------------------------------------------------
01

已用时间: 00: 00: 00.10
---------------------------------------------------------------

两个1之间的位与运算
SQL> select to_number(bitand(1,1)) from dual;

TO_NUMBER(BITAND(1,1))
----------------------
1
1与0之间的运算:
SQL> select to_number(bitand(1,0)) from dual;

TO_NUMBER(BITAND(1,0))
----------------------
0

0与0之间运算:
SQL> select to_number(bitand(0,0)) from dual;

TO_NUMBER(BITAND(0,0))
----------------------
0

是否想这种,请楼主。。

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

楼上的说的对,你具体试试看

Published At
Categories with 数据库类
comments powered by Disqus