BITCLEAR( ) Function

Clears the specified bit in a Numeric, Varbinary, or Blob value by setting it to 0 and returns the resulting value. There is a numeric and a binary version of the syntax.

NoteNote

If the specified expression is not an integer, it is converted to an integer before performing the operation.

BITCLEAR(nNumericExpression1, nNumericExpression2)
BITCLEAR(BinaryExpression [, nStartBit [, nBitCount]])

Parameters

nNumericExpression1

Specifies the Numeric value to clear the bit in. If the expression is not an integer, it is converted to an integer before setting the bit.

nNumericExpression2

Specifies the bit position in nExpression1 to clear. nExpression2 can range from 0 to 31 with 0 located as the bit to the farthest right.

BinaryExpression

Specifies a Varbinary or Blob expression.

[ nStartBit[, nBitCount]]

Specifies a starting zero-based number of the first bit to perform the operation as nStartBit and the number of bits to perform the operation as nBitCount.

If you do not specify nStartBit and nBitCount, the operation applies to all bits in the expression. If you specify nStartBit only, the operation applies to nStartBit only.

Expand imageReturn Value

Expand imageExample

Expand imageSee Also


© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic