bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

MySQL CHAR_LENGTH() Function

Example

SELECT CHAR_LENGTH("SQL Tutorial") AS LengthOfString;

Definition and Usage

The CHAR_LENGTH() function return the length of a string (in characters).

Note

This function is equal to the CHARACTER_LENGTH() function.

Syntax

CHAR_LENGTH(
string
)

Parameter Values

ParameterDescription
stringRequired. The string to count the length for

Technical Details

Works in:From MySQL 4.0

Previous

MySQL ASCII() Function

Next

MySQL CHARACTER_LENGTH() Function