bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

MySQL LENGTH() Function

Example

SELECT LENGTH("SQL Tutorial") AS LengthOfString;

Definition and Usage

The LENGTH() function returns the length of a string (in bytes).

Syntax

LENGTH(
string
)

Parameter Values

ParameterDescription
stringRequired. The string to count the length for

Technical Details

Works in:From MySQL 4.0

Previous

MySQL LEFT() Function

Next

MySQL LOCATE() Function