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 323 views
4 answers 505 views
1 answer 270 views
1 answer 269 views
1 answer 301 views
2 answers 309 views
...