The OCTET_LENGTH function returns the length of a string expression in octets (bytes). See LENGTH and CHARACTER_LENGTH for similar functions.
The result of the function is DECIMAL(31). If the argument can be null, the result can be null; if the argument is null, the result is the null value.
The result is the number of octets (bytes) in the argument. The length of a string includes trailing blanks. The length of a varying-length string is the actual length in octets (bytes), not the maximum length.
SELECT OCTET_LENGTH( C1 ) FROM T1Returns the value 20.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.