Export (0) Print
Expand All

Bitwise Canonical Functions

Entity SQL includes bitwise canonical functions. 

The following table shows the bitwise Entity SQL canonical functions. These functions will return Null if Null input is provided. The return type of the functions is the same as the argument type(s). Arguments must be of the same type, if the function takes more than one argument. To perform bitwise operations across different types, you need to cast to the same type explicitly.

Function Description

BitWiseAnd (value1, value2)

Returns the bitwise conjunction of value1 and value2 as the type of value1 and value2.

Arguments

A Byte, Int16, Int32, and Int64.

Example

-- The following example returns 1.

BitWiseAnd(1,3)

BitWiseNot (value)

Returns the bitwise negation of value.

Arguments

A Byte, Int16, Int32, and Int64.

Example

-- The following example returns -4.

BitWiseNot(3)

BitWiseOr (value1, value2)

Returns the bitwise disjunction of value1 and value2 as the type of value1 and value2.

Arguments

A Byte, Int16, Int32 and Int64.

Example

-- The following example returns 3.

BitWiseOr(1,3)

BitWiseXor (value1, value2)

Returns the bitwise exclusive disjunction of value1 and value2 as the type of value1 and value2.

Arguments

A Byte, Int16, Int32 and Int64.

Example

-- The following example returns 2.

BitWiseXor (1,3)

Community Additions

ADD
Show:
© 2014 Microsoft