The CHARACTER_LENGTH and CHAR_LENGTH functions return the number of characters in a string. The number returned is a 4-byte integer.
CHARACTER_LENGTH and CHAR_LENGTH should not be confused with $COL_LEN and $COLUMN_LENGTH which return the length of the column as it is defined in the environment catalog.
CHARACTER_LENGTH and CHAR_LENGTH are the same function. Both are supported for flexibility.
CHAR[ACTER]_LENGTH ( [column_spec | “string”] )
Required. Any column contained in the FROM clause. This can be a literal or data from a column.
Required. Any string. This can be a literal or data from a column.
SELECT company, city, CHAR_LENGTH (city) FROM customers WHERE state = 'co'
SELECT company, contact, CHARACTER_LENGTH ("Denver") FROM customers WHERE state = 'co'