A Chinese length in mysql how much

In the version of the above mysql5.0

UTF-8: a character equal to 3 bytes, a byte is English

GBK: a character equal to 2 bytes, a byte is English

 

I was in utf-8:

select * from sys_user where length(`name`)<=3

result:

 

select * from sys_user where length(`name`) =3

result:

Published 141 original articles · won praise 33 · views 50000 +

Guess you like

Origin blog.csdn.net/qq_43560721/article/details/102697079