Loading lesson path
Concept visual
Start at both ends
Return the length of the string:
SELECT CHARACTER_LENGTH("SQL Tutorial") AS LengthOfString;The CHARACTER_LENGTH() function return the length of a string (in characters).CHAR_LENGTH() function.
CHARACTER_LENGTH( string )
Required. The string to count the length for
From MySQL 4.0
Return the length of the text in the "CustomerName" column:
SELECT CHARACTER_LENGTH(CustomerName) AS LengthOfName
FROM Customers;❮ MySQL Functions