Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Reference » SQL Functions » Alphabetical list of functions

FLOOR function [Numeric] Next Page

GET_BIT function [Bit array]


Returns the value (1 or 0) of a specified bit in a bit array.

Syntax

GET_BIT( bit-expression, position )

Parameters

bit-expression    The bit array containing the bit.

position    The position of the bit for which to return the status.

Remarks

The first bit in the array is considered position 1.

If position exceeds the length of the array, 0 (false) is returned.

See also
Standards and compatibility

SQL/2003    Vendor extension.

Example

The following statement returns the value 1:

SELECT GET_BIT( '00110011' , 4 );

The following statement returns the value 0:

SELECT GET_BIT( '00110011' , 5 );