1.按照year从高到低排序,但是如果thumb为空,即使year很高也要排在有thumb的最低的year后面
1 | select * from TABLE order by thumb is null,year desc; |
2.按照year从高到低排序,但是如果thumb为空字符串,即使year很高也要排在有thumb的最低的year后面
1 | select * from TABLE order by thumb ='',year desc; |
1.按照year从高到低排序,但是如果thumb为固定字符串no picture,即使year很高也要排在有thumb的最低的year后面
1 | select * from TABLE order by thumb = 'no picture',year desc; |