Jump to: navigation, search

Mysql CHAR LENGTH

From w3cyberlearnings

Contents

MySQL CHAR_LENGTH Function

This function returns size or length of a string.

Syntax CHAR_LENGTH

Str: String input

CHAR_LENGTH(Str);

Example 1

mysql> SELECT CHAR_LENGTH('good');
+---------------------+
| CHAR_LENGTH('good') |
+---------------------+
|                   4 |
+---------------------+
1 row in set (0.00 sec)

Example 2

mysql> SELECT CHAR_LENGTH('go');
+-------------------+
| CHAR_LENGTH('go') |
+-------------------+
|                 2 |
+-------------------+
1 row in set (0.00 sec)


Related Links


Navigation
Web
SQL
MISC
References