共用方式為


位元標準函式

Entity SQL 包含位元標準函式。

備註

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

函式 描述
BitWiseAnd ( value1 , value2 ) 傳回 value1value2 的位元結合,作為 value1value2 的型別。

引數

A ByteInt16Int32Int64

範例

-- The following example returns 1.

BitWiseAnd(1,3)
BitWiseNot ( value ) 傳回 value 的位元否定。

引數

A ByteInt16Int32Int64

範例

-- The following example returns -4.

BitWiseNot(3)
BitWiseOr ( value1 , value2 ) 傳回 value1value2 的位元分離,作為 value1value2 的型別。

引數

A ByteInt16Int32Int64

範例

-- The following example returns 3.

BitWiseOr(1,3)
BitWiseXor ( value1 , value2 ) 傳回 value1value2 的位元排除分離,作為 value1value2 的型別。

引數

A ByteInt16Int32Int64

範例

-- The following example returns 2.

BitWiseXor (1,3)

另請參閱