嗨,如何使用 mysql 来基于Windows版本对这些数据进行排序?我需要变得像这样:
WINDOWS 2000
WINDOWS 7家庭高级版
WINDOWS 7专业版
WINDOWS 7 ULTIMATE
WINDOWS 8
WINDOWS 8 PRO
WINDOWS 8.1
WINDOWS 10 HOME
WINDOWS 10 PRO
请指导我。谢谢!
答案 0 :(得分:-1)
@Que对此进行检查...
select * from tablename order by FIELD(WINDOWS_TYPE , 'WINDOWS 2000', 'WINDOWS 7 HOME PREMIUM', 'WINDOWS 7 PROFESSIONAL', 'WINDOWS 7 ULTIMATE','WINDOWS 8','WINDOWS 8 PRO','WINDOWS 8.1','WINDOWS 10 HOME','WINDOWS 10 PRO') desc