The functions BYTE_LENGTH64, BYTE_SUBSTR64, and BYTE_SUBSTR support LONG BINARY data.
The LONG VARCHAR functions BIT_LENGTH, OCTET_LENGTH, and SUBSTRING64 also support LONG BINARY data.
The BYTE_LENGTH64 function returns an unsigned 64 bit value containing the byte length of the LONG BINARY column parameter.
Syntax:
BYTE_LENGTH64( large-object-column )
Parameter:
large-object-column The name of a LONG BINARY column.
The BYTE_LENGTH64 function also supports the LONG VARCHAR data type.
The BYTE_SUBSTR64 and BYTE_SUBSTR functions return the long binary byte substring of the LONG BINARY column parameter.
Syntax:
BYTE_SUBSTR64( large-object-column, start, length )
BYTE_SUBSTR( large-object-column, start, length )
Parameters:
large-object-column The name of a LONG BINARY column.
start An integer expression indicating the start of the substring. A positive integer starts from the beginning of the string, with the first byte at position 1. A negative integer specifies a substring starting from the end of the string, with the final byte at position -1.
length An integer expression indicating the length of the substring. A positive length specifies the number of bytes to return, starting at the start position. A negative length specifies the number of bytes to return, ending at the start position.
The BYTE_SUBSTR64 and BYTE_SUBSTR functions also support the LONG VARCHAR data type.
Nesting of the functions BYTE_LENGTH64, BYTE_SUBSTR64, and BYTE_SUBSTR is not supported.
Only the aggregate function COUNT (*) is supported for LONG BINARY columns. The COUNT DISTINCT parameter is not supported. An error is returned if a LONG BINARY column is used with the MIN, MAX, AVG, or SUM aggregate functions.