|
|
Find the length of the longest string in MySQL - Mysql
|
Views : 325
|
|
Tagged in : Mysql
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
The LENGTH() function in MySQL returns the length of a string in bytes. Multi-byte characters will count as multiple bytes. The example uses the LENGTH() function but you can substitute them with the CHAR_LENGTH() function instead if you want to count the number of characters rather than bytes.
SELECT LENGTH('this is a test');
This will return the number 14.
|
|
By Rekha, On - 2010-01-28 |
|
|
|