Bitwise Logical Functions
Element | Description | Restrictions | Syntax |
---|---|---|---|
int8_expr | Number expression that can be converted to an INT8 value | For BITNOT the maximum size is reduced by 1 | Expression |
The arguments to these functions can be any numeric data type that can be converted to the INT8 data type.
Except for BITNOT, which takes a single argument, these bitwise logical functions take two arguments that can be converted to an INT8 value.
If both arguments have the same integer types, the data type of the returned value is the same type as the arguments. If the two arguments are of different integer types, the returned value is the integer type with the greater precision. For example, if the first argument is of type INT, and the second argument is of type INT8, the returned value is of type INT8.
If the arguments are any other numeric type, such as DECIMAL, SMALLFLOAT, FLOAT, or MONEY, or some combination of those types, the returned data type is DECIMAL(32).
sprintf(query1, “, bitand( ?::int8, ?::int8) from mytab”); EXEC SQL prepare selectq from :query; EXEC SQL declare select_cursor cursor for selectq; EXEC SQL open select_cursor using :hostvar_int8_input1, :hostvar_int8_input2; EXEC SQL fetch select_cursor into :var_int8_output;