Returns the number of characters in a string.
CHAR_LENGTH ( string-expression )
string-expression The string whose length is to be calculated.
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 value returned by the CHAR_LENGTH function may differ from the number of bytes returned by the BYTE_LENGTH function.
You can use the CHAR_LENGTH function and the LENGTH function interchangeably for CHAR, VARCHAR, and LONG VARCHAR data types. However, you must use the LENGTH function for BINARY and bit array data types.
SQL/2003 Core feature.
The following statement returns the value 8.
SELECT CHAR_LENGTH( 'Chemical' );
|Discuss this page in DocCommentXchange.
Send feedback about this page using email.
|Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|