Jump to: navigation, search

Mysql OCTET LENGTH

From w3cyberlearnings

Contents

MySQL OCT_LENGTH Function

This function returns a length of a given string, and it is equal to LENGTH() function.

Syntax OCT_LENGTH

  • Str: A given string
OCT_LENGTH(Str);

Example 1

mysql> SELECT OCTET_LENGTH('good old lady'),LENGTH('good old lady');
+-------------------------------+-------------------------+
| OCTET_LENGTH('good old lady') | LENGTH('good old lady') |
+-------------------------------+-------------------------+
|                            13 |                      13 | 
+-------------------------------+-------------------------+
1 row in set (0.00 sec)

Related Links


Navigation
Web
SQL
MISC
References