Returns the number of bytes in a string.
Remarks
Trailing white space characters are included in the length
returned.
The return value of a NULL string is NULL.
If the string is in a multibyte character set, the BYTE_LENGTH value
differs from the number of characters returned by CHAR_LENGTH.
If you are licensed to use the Unstructured Data Analytics functionality, you can
use this function with large object data:
- The BYTE_LENGTH function
supports both LONG BINARY columns and
variables and LONG VARCHAR columns and
variables, only if the query returns less than 2GB. If the byte length of
the returned LONG BINARY or LONG VARCHAR data is greater than or equal to
2GB, BYTE_LENGTH returns an error that
says you must use the BYTE_LENGTH64
function.