What's the main difference between length()
and char_length()
?
I believe it has something to do with binary and non-binary strings. Is there any practical reason to store strings as binary?
mysql> select length('MySQL'), char_length('MySQL');
+-----------------+----------------------+
| length('MySQL') | char_length('MySQL') |
+-----------------+----------------------+
| 5 | 5 |
+-----------------+----------------------+
1 row in set (0.01 sec)