实例SQL为SELECT * FROM es_server_list ORDER BY LEFT(server_name,1) DESC, MID(server_name,2)+0;

实际效果为先按该字段server_name第一个字符排序a-z,再按后面的数字进行排序


转载本站文章请注明,转载自:伟哥的技术博客 https://www.wuxiaowei.com

本文永久链接: https://www.wuxiaowei.com/db/mysql/mysql%e5%af%b9%e6%b7%b7%e5%90%88%e6%95%b0%e6%8d%ae%e5%ad%97%e6%ae%b5%e6%8e%92%e5%ba%8f%e5%ad%97%e6%af%8d%e5%8a%a0%e6%95%b0%e5%ad%97%e6%8e%92%e5%ba%8f/