case when inq.urgent_flag=1 and urgeCount=2 then @sort:=99 when inq.urgent_flag=1 and urgeCount=1 then @sort:=97 when inq.urgent_flag=1 and urgeCount=0 then @sort:=95 when inq.urgent_flag=0 and urgeCount=2 then @sort:=93 when inq.urgent_flag=0 and urgeCount=1 then @sort:=91 else @sort:=87 end as sort ORDER BY res.sort
标签:sort,case,urgeCount,when,inq,urgent,flag From: https://www.cnblogs.com/deepalley/p/16745203.html