FirebirdSQL logo

BIN_XOR()

Bitwise XOR

Result type

integer type (the widest type of the arguments)

Note

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.

Syntax
BIN_XOR (number, number [, number ...])
Table 1. BIN_XOR Function Parameters
Parameter Description

number

A number of an integer type

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

CHAR_TO_UUID()

Converts a string UUID to its binary representation

Result type

BINARY(16)

Syntax
CHAR_TO_UUID (ascii_uuid)
Table 1. CHAR_TO_UUID Function Parameter
Parameter Description

ascii_uuid

A 36-character representation of UUID.‘-’ (hyphen) in positions 9, 14, 19 and 24;valid hexadecimal digits in any other positions, e.g. 'A0bF4E45-3029-2a44-D493-4998c9b439A3'

Converts a human-readable 36-char UUID string to the corresponding 16-byte UUID.

CHAR_TO_UUID Examples

select char_to_uuid('A0bF4E45-3029-2a44-D493-4998c9b439A3') from rdb$database
-- returns A0BF4E4530292A44D4934998C9B439A3 (16-byte string)

select char_to_uuid('A0bF4E45-3029-2A44-X493-4998c9b439A3') from rdb$database
-- error: -Human readable UUID argument for CHAR_TO_UUID must
--         have hex digit at position 20 instead of "X (ASCII 88)"