传统的排序方法,比如select * from tableA order by id desc可以对英文、数字进行排序。但是遇到中文就没有办法了。这个时候需要以下的语句:

  select * from tableA order by convert(name using gbk) collate gbk_chinese_ci desc。这个时候就可以对name进行排序,排序规则是按照中文的首字母进行排序。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-11
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-08
  • 2022-12-23
  • 2021-12-12
  • 2021-12-15
相关资源
相似解决方案