To return the number of characters in a specified string, the correct syntax is _____.
To return the number of characters in a specified string, the correct syntax is _____.
Solution
LENGTH() is the MySQL string function that returns the length of a string, so SELECT LENGTH("Information"); returns 11.
Option 2: SIZE() is not a MySQL string function.
Option 3: COUNT() is an aggregate function that counts rows or non-NULL values in a column, not characters in a string.
Option 4: ALL is a keyword used with SELECT or comparison subqueries, not a function.
LENGTH() counts bytes, while CHAR_LENGTH() counts characters. For plain English text like "Information" the two give the same result.
Related questions:
2026: 21 May Shift 1
2026: 26 May Shift 1
2025: 30 May Shift 2
2026: 23 May Shift 2
2025: 15 May Shift 2