zl程序教程

您现在的位置是:首页 >  其它

当前栏目

sort case when

when Sort case
2023-09-11 14:17:03 时间
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