DSQL, PSQL

    Possible name conflict

    YES →

    Syntax

    Result type

    SMALLINT, INTEGER or BIGINT

    SMALLINT result is returned only if all the arguments are explicit SMALLINTs or NUMERIC(n, 0) with n <= 4; otherwise small integers return an INTEGER result.

    Description

    Returns the result of the bitwise AND operation on the argument(s).

    See also

    BIN_OR(),

    8.6.2. BIN_NOT()

    Available in

    DSQL, PSQL

    Possible name conflict

    NO

    Syntax

    1. BIN_NOT (number)
    Table 148. BIN_NOT Function Parameter
    ParameterDescription

    number

    Any integer number (literal, smallint/integer/bigint, numeric/decimal with scale 0)

    Result type

    SMALLINT, or BIGINT

    Description

    Returns the result of the bitwise NOT operation on the argument, i.e. ones complement.

    See also

    Available in

    DSQL, PSQL

    Possible name conflict

    YES →

    Syntax

    Table 149. BIN_OR Function Parameters
    ParameterDescription

    number

    Any integer number (literal, smallint/integer/bigint, numeric/decimal with scale 0)

    Result type

    SMALLINT, INTEGER or BIGINT

    SMALLINT result is returned only if all the arguments are explicit SMALLINTs or NUMERIC(n, 0) with n <= 4; otherwise small integers return an INTEGER result.

    Description

    Returns the result of the bitwise OR operation on the argument(s).

    See also

    BIN_AND(),

    8.6.4. BIN_SHL()

    Available in

    DSQL, PSQL

    Syntax

    1. BIN_SHL (number, shift)

    Result type

    BIGINT

    Description

    Returns the first argument bitwise left-shifted by the second argument, i.e. a << b or a·2b.

    See also

    Available in

    DSQL, PSQL

    Syntax

    Table 151. BIN_SHR Function Parameters
    ParameterDescription

    number

    A number of an integer type

    shift

    The number of bits the number value is shifted by

    Result type

    BIGINT

    Description

    Returns the first argument bitwise right-shifted by the second argument, i.e. a >> b or a/2b.

    See also

    8.6.6. BIN_XOR()

    Available in

    DSQL, PSQL

    Possible name conflict

    YES →

    Syntax

    1. BIN_XOR (number, number [, number ...])
    Table 152. BIN_XOR Function Parameters
    ParameterDescription

    number

    Any integer number (literal, smallint/integer/bigint, numeric/decimal with scale 0)

    Result type

    SMALLINT, INTEGER or BIGINT

    Description

    Returns the result of the bitwise XOR operation on the argument(s).

    See also