If the field storing the name uses the GBK character set, then it will be easy to deal with, because the GBK internal code itself uses the pinyin sorting method when encoding (the 3755 commonly used first-level Chinese characters are sorted by pinyin, while the second-level Chinese characters are not, but considering that people's names are commonly used Chinese characters, it is sufficient to just sort the first-level Chinese characters correctly). Directly add order by name asc after the query statement; the query results are sorted in ascending order by last name; If the field storing the name uses the utf8 character set, the field needs to be converted when sorting; the code is order by convert(name using gbk) asc; Similarly, the query results are sorted in ascending order by last name; The above simple example of MySQL sorting according to the pinyin of Chinese characters is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. You may also be interested in:
|
<<: js to achieve interesting countdown effect
>>: Solution to the welcome to emergency mode message when booting CentOS7.4
I have written an example before, a simple UDP se...
There are three ways to introduce CSS: inline sty...
This article example shares the specific code of ...
1. Installation Install using yum ##Automatically...
Installation Environment Description •System vers...
Docker provides multiple networks such as bridge,...
Date-type single-row functions in MySQL: CURDATE(...
In the horizontal direction, you can set the alig...
<br />This section introduces how to impleme...
Preface CSS grids are usually bundled in various ...
Whether it is the background image or the text siz...
Table of contents 1. Principle Overview Query Cac...
Table of contents 1. Database design 2. Front-end...
1. Refine the selector By using combinators, the ...
Table of contents 1. beforeunload event 2. Unload...