BYTE_LENGTH Function

The BYTE_LENGTH function returns the number of bytes in a string.

Usage

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.

For BYTE_LENGTH function syntax and usage, see Reference: Building Blocks, Tables, and Procedures> SQL Functions > Alphabetical List of Functions > BYTE_LENGTH Function [String].