Loading lesson path
Concept visual
Start at both ends
Return the length of the string:
SELECT CHAR_LENGTH("SQL Tutorial") AS LengthOfString;The CHAR_LENGTH() function return the length of a string (in characters).CHARACTER_LENGTH() function.
CHAR_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 CHAR_LENGTH(CustomerName) AS LengthOfName
FROM Customers;❮ MySQL Functions