BITMASK()

Scalar. Returns a value with all bits set to zero except for a specified range of bits.

Syntax

BITMASK( first, last )BITMASKLONG( first, last )
Parameters

first

The first bit to set, starting from 0 as the least-significant bit.

last

The last bit to set, starting from 0 as the least-significant bit.

Data Types

Return

first

last

Integer (BITMASK)

Integer

Integer

Long (BITMASKLONG)

Integer

Integer

Example

INSERT INTO OutStream
SELECT BITMASK(1, 6)
FROM InStream;