Introduction to Oracle bitand () Functions

Source: Internet
Author: User

Oracle bitand () functions are common in Oracle databases. The following describes the usage of Oracle bitand () functions in detail. If you are interested, take a look.

Oracle bitand () functions:

Returns the result of the bitwise and operation of two numeric values.
Syntax
BITAND (nExpression1, nExpression2)
Parameters
NExpression1, nExpression2
 
Specify two values for the AND operation by bit. If nExpression1 AND nExpression2 are non-integer, they are converted to Integers before the AND operation by bit.
 
Oracle bitand () function return value type:
Numeric type
 
Description
BITAND () compares each bit of nExpression1 with the corresponding bit of nExpression2. If the bits of nExpression1 and nExpression2 are both 1, the corresponding result bit is 1; otherwise, the corresponding result bit is 0.

The following table lists the results of the AND operation on nExpression1 AND nExpression2 by bit:
 
NExpression1 nExpression2 result bit
0 0 0
0 1 0
1 1 1
1 0 0
Bitand () function example
X = 5 & Binary 0101
Y = 6 & Binary 0110
? Bitand (x, y) & Return Value 4, binary is 0100

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

The preceding section describes the syntax of the Oracle bitand () function.

Use of oracle Aggregate functions

Oracle functions for Calculating Time Difference

Use of oracle custom functions

Oracle TRIM function syntax

Oracle date functions

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.