先根据status以'R','F','I'的顺序排序, 再根据时间倒排 :
SELECT * FROM table ORDER BY FIELD(status,'R','F','I'),createTime desc;
注意 : field()函数不可以与'asc'和'desc'共同使用!!!
错误示范 :SELECT * FROM table ORDER BY FIELD(status,'R','F','I') asc;
先根据status以'R','F','I'的顺序排序, 再根据时间倒排 :
SELECT * FROM table ORDER BY FIELD(status,'R','F','I'),createTime desc;
注意 : field()函数不可以与'asc'和'desc'共同使用!!!
错误示范 :SELECT * FROM table ORDER BY FIELD(status,'R','F','I') asc;