4,5,7,1,2,3 1. Sort the order cstate
sql statement:
SELECT c.cstate,c.mc_1
from
s_c c
where
c.cstate in(1,2,3,4,5,7)
ORDER BY FIELD(c.cstate,4,5,7,1,2,3);
The sequence cstate 3,2,1 sort of 4,5,7,1,2,3 and mc_1
Statement:
SELECT c.cstate,c.mc_1
from
s_c c
where
c.cstate in(1,2,3,4,5,7)
ORDER BY FIELD(c.cstate,4,5,7,1,2,3),FIELD(c.mc_1,3,2,1);