CHAR_LENGTH() – How to Find length of a string in MySQL?

Spread the love


The CHAR_LENGTH() function returns the length of a string in SQL.

Syntax –


string – the string for which you want to count the length

Example –

SELECT CHAR_LENGTH("I am learning SQL") AS LengthOfString;

Rating: 1 out of 5.

Leave a Reply