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 542 views
4 answers 796 views
1 answer 455 views
1 answer 446 views
1 answer 492 views
2 answers 540 views
...