Home > Database > Mysql Tutorial > 让MySQL支持中文排序_MySQL

让MySQL支持中文排序_MySQL

WBOY
Release: 2016-06-01 13:50:56
Original
1183 people have browsed it

bitsCN.com 让MySQL支持中文排序
编绎MySQL时一般以ISO-8859字符集作为默认的字符集,因此在比较过程中中文编码字符大小写转换造成了这种现象,一种解决方法是对于包含中文的字段加上"binary"属性,使之作为二进制比较,例如将"name char(10)"改成"name char(10)binary"。 编译MySQL时使用--with--charset=gbk 参数,这样MySQL就会直接支持中文查找和排序了。bitsCN.com

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template