CHAR_LENGTH
function return number of characters in a string, where as LENGTH function
return amount of space occupied by string in bytes.
mysql> SELECT CHAR_LENGTH("你好"); +-----------------------+ | CHAR_LENGTH("你好") | +-----------------------+ | 2 | +-----------------------+ 1 row in set (0.00 sec) mysql> SELECT LENGTH("你好"); +------------------+ | LENGTH("你好") | +------------------+ | 6 | +------------------+ 1 row in set (0.00 sec)
No comments:
Post a Comment