Detailed explanation of MySQL sorting Chinese characters By default, MySQL only supports sorting of dates, times, and English strings. If you use order by on Chinese characters, you may not get the desired results. For example, the following query will not sort by the pinyin of Chinese characters as we want: SELECT * from user order by user_name; If you want to sort relative to Chinese, you can use CONVERT (coloum_name USING GBK) to convert Chinese to GBK encoding, and then sort, you can sort according to the pinyin of Chinese: SELECT * from user order by CONVERT(user_name USING GBK); Thank you for reading, I hope it can help you, thank you for your support of this site! You may also be interested in:
|
<<: Linux command line quick tips: How to locate a file
>>: In-depth understanding of javascript class array
After installing the latest version 8.0.11 of mys...
IP masquerading and port forwarding Firewalld sup...
Use the find command to find files larger than a ...
The installation process of MySQL 8.0 Windows zip...
This article uses an example to describe the simp...
In the previous article, I introduced the detaile...
This article uses examples to illustrate the prin...
Table of contents Preface 1. Paste Events and Cli...
Table of contents Overview 1. Separation of front...
This article shares the specific code of javascri...
1. Docker cross-host communication Docker cross-h...
What is "Sticky Footer" The so-called &...
Table of contents Preface 1. Application componen...
How can you find the location of the configuratio...
Let me first introduce an interesting property - ...