This function is used to cast data to the
BYTEARRAY data type.
BYTEARRAY ( arg )
The value to be cast. The value can be any data type and its byte representation is determined by how the value is written to data pages.
BYTEARRAY representation of the value provided.
This returns the byte representation of the
BYTE_ARRAY(1) [BYTE ARRAY]
[1 0 0 0 0 0 0 0]
If we operate on a more complex type, like a
DATE the output is less readable. A
DATE in bSQL is stored as a
UINT16 and two
UINT8's, hence length 4 byte array.
BYTE_ARRAY(DATE(2021-05-12)) [BYTE ARRAY]
[229 7 5 12]