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, LONG VARCHAR, and NCHAR data types. However, you must use the LENGTH function for BINARY and bit array data types.
This function supports NCHAR inputs and/or outputs.
SQL/2003 Core feature.
The following statement returns the value 8.
SELECT CHAR_LENGTH( 'Chemical' ); |
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |