What is the different between SQL LENGTH() and CHAR_LENGTH() Functions in MySQL

2 Answers

0 votes
LENGTH() returns string length in bytes.
CHAR_LENGTH() returns string length in characters.

 



answered Oct 11, 2015 by avibootz
0 votes
select length(_utf8 'Ű') as length_f, char_length(_utf8 'Ű') as char_length_f

-- length_f 	char_length_f 	
--     2 	          1

 



answered Oct 11, 2015 by avibootz

Related questions

2 answers 386 views
4 answers 561 views
1 answer 329 views
1 answer 330 views
1 answer 373 views
2 answers 372 views
...