OCTET_LENGTH() FUNCTION in MySQL

OCTET_LENGTH() FUNCTION
The MySQL OCTET_LENGTH function is used to get the length of the specified string.

Syntax:

OCTET_LENGTH (string);

Parameters:
string: It is used to specify the string to evaluate.

Example:

mysql> SELECT OCTET_LENGTH (‘ABC’);

Output:

3

Explanation:
The length of the specified string is returned.