BITAND Function in Oracle SQL – PLSQL

The BITAND function in Oracle SQL / PLSQL is used to return an integer number representing an AND operation between the bits of expressions passed.

Syntax for the BITAND function in Oracle SQL / PLSQL is:

SELECT BITAND(expression1, expression2)
FROM table_name;

Expression1 and expression2 must resolve to positive integers

Example 1:
[sourcecode language=”sql”]
SELECT BITAND(20,10)
FROM DUAL;[/sourcecode]

Will return “0”


Example 2:
[sourcecode language=”sql”]
SELECT BITAND(20,30)
FROM DUAL;[/sourcecode]

Will return “20”


Leave a Reply

Your email address will not be published. Required fields are marked *