Partilhar via


Funções canônicas bitwise

O Entity SQL inclui funções canônicas bitwise.

Observações

A tabela a seguir mostra as funções canônicas bit a bit do Entity SQL. Essas funções retornarão Null se Null a entrada for fornecida. O tipo de retorno das funções é o mesmo que o(s) tipo(s) de argumento(s). Os argumentos devem ser do mesmo tipo, se a função usar mais de um argumento. Para executar operações bit a bit em diferentes tipos, você precisa converter para o mesmo tipo explicitamente.

Function Description
BitWiseAnd ( value1 , value2 ) Retorna a conjunção bit a bit de value1 e value2 como o tipo de value1 e value2.

Argumentos

A Byte, Int16, Int32, e Int64.

Exemplo

-- The following example returns 1.

BitWiseAnd(1,3)
BitWiseNot ( value ) Devolve a negação bit a bit de value.

Argumentos

A Byte, Int16, Int32, e Int64.

Exemplo

-- The following example returns -4.

BitWiseNot(3)
BitWiseOr ( value1 , value2 ) Devolve a disjunção bit a bit de value1 e value2 como o tipo de value1 e value2.

Argumentos

A Byte, Int16, Int32 e Int64.

Exemplo

-- The following example returns 3.

BitWiseOr(1,3)
BitWiseXor ( value1 , value2 ) Devolve a disjunção exclusiva bitwise de value1 e value2 como o tipo de value1 e value2.

Argumentos

A Byte, Int16, Int32 e Int64.

Exemplo

-- The following example returns 2.

BitWiseXor (1,3)

Consulte também