位元標準函式 (Entity SQL)

Entity SQL 包含位元標準函式。

備註

下表將顯示位元 Entity SQL 標準函式。如果提供了 Null 輸入,這些函式就會傳回 Null。這些函式的傳回型別與引數型別相同。引數必須屬於相同的型別 (如果函式接受多個引數的話)。若要針對不同的型別執行位元運算,您必須明確轉型為相同的型別。

函式 描述

BitWiseAnd ( value1 , value2 )

傳回 value1value2 的位元結合當做 value1value2 的型別。

引數

ByteInt16Int32Int64

範例

-- The following example returns 1.

BitWiseAnd(1,3)

BitWiseNot ( value )

傳回 value 的位元否定運算。

引數

ByteInt16Int32Int64

範例

-- The following example returns -4.

BitWiseNot(3)

BitWiseOr ( value1 , value2 )

傳回 value1value2 的位元分離當做 value1value2 的型別。

引數

ByteInt16Int32Int64

範例

-- The following example returns 3.

BitWiseOr(1,3)

BitWiseXor ( value1 , value2 )

傳回 value1value2 的位元排除分離當做 value1value2 的型別。

引數

ByteInt16Int32Int64

範例

-- The following example returns 2.

BitWiseXor (1,3)

另請參閱

概念

標準函式 (Entity SQL)